diff plugins/mod_user_account_management.lua @ 11120:b2331f3dfeea

Merge 0.11->trunk
author Matthew Wild <mwild1@gmail.com>
date Wed, 30 Sep 2020 09:50:33 +0100
parents fcdc65bc6697
children 74b9e05af71e
line wrap: on
line diff
--- a/plugins/mod_user_account_management.lua	Thu Oct 01 15:08:58 2020 +0100
+++ b/plugins/mod_user_account_management.lua	Wed Sep 30 09:50:33 2020 +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));