Software /
code /
prosody
Changeset
10563:e8db377a2983
Merge 0.11->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 24 Dec 2019 00:39:45 +0100 |
parents | 10562:670afc079f68 (diff) 10560:3adb6c46fbf4 (current diff) |
children | 10564:3098eac31139 |
files | net/http/files.lua plugins/mod_auth_internal_hashed.lua plugins/mod_mam/mod_mam.lua plugins/mod_muc_mam.lua |
diffstat | 3 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_auth_internal_hashed.lua Mon Dec 23 23:31:09 2019 +0100 +++ b/plugins/mod_auth_internal_hashed.lua Tue Dec 24 00:39:45 2019 +0100 @@ -70,6 +70,9 @@ 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 @@ 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, {
--- a/plugins/mod_mam/mod_mam.lua Mon Dec 23 23:31:09 2019 +0100 +++ b/plugins/mod_mam/mod_mam.lua Tue Dec 24 00:39:45 2019 +0100 @@ -347,6 +347,8 @@ 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 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);
--- a/plugins/mod_muc_mam.lua Mon Dec 23 23:31:09 2019 +0100 +++ b/plugins/mod_muc_mam.lua Tue Dec 24 00:39:45 2019 +0100 @@ -405,6 +405,8 @@ 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 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);