# HG changeset patch # User Kim Alvefur # Date 1572705836 -3600 # Node ID fcdc65bc66973011ee06495a760805c106f19621 # Parent 66fa45d244815ed56afb1a36309a20b802d2adc4 mod_user_account_management: Apply username normalization later Prevents traceback from nodeprep(nil) diff -r 66fa45d24481 -r fcdc65bc6697 plugins/mod_user_account_management.lua --- a/plugins/mod_user_account_management.lua Sat Nov 02 15:43:17 2019 +0100 +++ b/plugins/mod_user_account_management.lua Sat Nov 02 15:43:56 2019 +0100 @@ -53,9 +53,10 @@ log("info", "User removed their account: %s@%s", username, host); module:fire_event("user-deregistered", { username = username, host = host, source = "mod_register", session = session }); else - local username = nodeprep(query:get_child_text("username")); + local username = query:get_child_text("username"); local password = query:get_child_text("password"); if username and password then + username = nodeprep(username); if username == session.username then if usermanager_set_password(username, password, session.host, session.resource) then session.send(st.reply(stanza));