Software /
code /
prosody
Changeset
10382:fcdc65bc6697
mod_user_account_management: Apply username normalization later
Prevents traceback from nodeprep(nil)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 02 Nov 2019 15:43:56 +0100 |
parents | 10381:66fa45d24481 |
children | 10383:496248e48a1d |
files | plugins/mod_user_account_management.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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));