Changeset

5751:80702e33ba71

mod_storage_s3: Fix storing archives for host itself (e.g. mod_audit) Fixes error due to path constructor trying to do string.gsub(nil) with missing username or with fields.
author Kim Alvefur <zash@zash.se>
date Wed, 22 Nov 2023 12:56:50 +0100
parents 5750:372b6c4bf409
children 5752:79ba1a1a75cc
files mod_storage_s3/mod_storage_s3.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_storage_s3/mod_storage_s3.lua	Wed Nov 22 11:54:22 2023 +0000
+++ b/mod_storage_s3/mod_storage_s3.lua	Wed Nov 22 12:56:50 2023 +0100
@@ -206,8 +206,8 @@
 		bucket;
 		jid.escape(module.host);
 		jid.escape(self.store);
-		jid.escape(username);
-		jid.escape(jid.prep(with));
+		jid.escape(username or "@");
+		jid.escape(with and jid.prep(with) or "@");
 		date or dt.date(when);
 		key;
 	})