aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-11-02 15:43:56 +0100
committerKim Alvefur <zash@zash.se>2019-11-02 15:43:56 +0100
commit1783288951625b5eee9f28d81bc31145530cf774 (patch)
tree35000130ac58bdf4fa8c8efff92700584c63a902 /plugins
parentb24814cbe469216a4321635a48e3f9077d313f49 (diff)
downloadprosody-1783288951625b5eee9f28d81bc31145530cf774.tar.gz
prosody-1783288951625b5eee9f28d81bc31145530cf774.zip
mod_user_account_management: Apply username normalization later
Prevents traceback from nodeprep(nil)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_user_account_management.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_user_account_management.lua b/plugins/mod_user_account_management.lua
index 615c1ed6..130ed089 100644
--- a/plugins/mod_user_account_management.lua
+++ b/plugins/mod_user_account_management.lua
@@ -53,9 +53,10 @@ local function handle_registration_stanza(event)
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));