X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_register.lua;h=25c09dfa69a2c0013bd5e474a04ccb50348c7913;hb=0ba1be1015d883c8dc6d1eed2ec84114af09ef6f;hp=7373adadb985d6953a996ba12bf89c4e916d4e6b;hpb=a6edede69c94167d0b64a5b826018a4cd4cedd03;p=prosody.git diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua index 7373adad..25c09dfa 100644 --- a/plugins/mod_register.lua +++ b/plugins/mod_register.lua @@ -71,12 +71,9 @@ local function handle_registration_stanza(event) module: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 = query:child_with_name("username"); - local password = query:child_with_name("password"); + local username = nodeprep(query:get_child("username"):get_text()); + local password = query:get_child("password"):get_text(); if username and password then - -- FIXME shouldn't use table.concat - username = nodeprep(table.concat(username)); - password = table.concat(password); if username == session.username then if usermanager_set_password(username, password, session.host) then session.send(st.reply(stanza));