diff options
-rw-r--r-- | plugins/mod_auth_internal_hashed.lua | 6 | ||||
-rw-r--r-- | plugins/mod_mam/mod_mam.lua | 5 | ||||
-rw-r--r-- | plugins/mod_muc_mam.lua | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua index be22a8d8..c81830de 100644 --- a/plugins/mod_auth_internal_hashed.lua +++ b/plugins/mod_auth_internal_hashed.lua @@ -70,6 +70,9 @@ function provider.set_password(username, password) account.salt = generate_uuid(); account.iteration_count = max(account.iteration_count or 0, default_iteration_count); local valid, stored_key, server_key = get_auth_db(password, account.salt, account.iteration_count); + if not valid then + return valid, stored_key; + end local stored_key_hex = to_hex(stored_key); local server_key_hex = to_hex(server_key); @@ -101,6 +104,9 @@ function provider.create_user(username, password) end local salt = generate_uuid(); local valid, stored_key, server_key = get_auth_db(password, salt, default_iteration_count); + if not valid then + return valid, stored_key; + end local stored_key_hex = to_hex(stored_key); local server_key_hex = to_hex(server_key); return accounts:set(username, { diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua index 018aef77..b67635c9 100644 --- a/plugins/mod_mam/mod_mam.lua +++ b/plugins/mod_mam/mod_mam.lua @@ -347,6 +347,8 @@ local function message_handler(event, c2s) event.stanza = clone_for_other_handlers; schedule_cleanup(store_user); module:fire_event("archive-message-added", { origin = origin, stanza = clone_for_storage, for_user = store_user, id = id }); + else + log("error", "Could not archive stanza: %s", err); end else log("debug", "Not archiving stanza: %s (prefs)", stanza:top_tag()); @@ -427,6 +429,9 @@ if cleanup_after ~= "never" then if ok then num_users = num_users + 1; sum = sum + (tonumber(ok) or 0); + else + cleanup_map:set(cut_off, user, true); + module:log("error", "Could not delete messages for user '%s': %s", user, err); end end module:log("info", "Deleted %d expired messages for %d users", sum, num_users); diff --git a/plugins/mod_muc_mam.lua b/plugins/mod_muc_mam.lua index 2e26893a..fee75e33 100644 --- a/plugins/mod_muc_mam.lua +++ b/plugins/mod_muc_mam.lua @@ -405,6 +405,8 @@ local function save_to_history(self, stanza) if id then schedule_cleanup(room_node); stanza:add_direct_child(st.stanza("stanza-id", { xmlns = xmlns_st_id, by = self.jid, id = id })); + else + module:log("error", "Could not archive stanza: %s", err); end end @@ -504,6 +506,9 @@ if cleanup_after ~= "never" then if ok then num_rooms = num_rooms + 1; sum = sum + (tonumber(ok) or 0); + else + cleanup_map:set(cut_off, room, true); + module:log("error", "Could not delete messages for room '%s': %s", room, err); end end module:log("info", "Deleted %d expired messages for %d rooms", sum, num_rooms); |