projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c99c64f
)
mod_register: Don't disable account before deleting it (unnecessary, and can cause...
author
Waqas Hussain
<waqas20@gmail.com>
Wed, 23 Jun 2010 22:46:52 +0000
(
03:46
+0500)
committer
Waqas Hussain
<waqas20@gmail.com>
Wed, 23 Jun 2010 22:46:52 +0000
(
03:46
+0500)
plugins/mod_register.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_register.lua
b/plugins/mod_register.lua
index 7e150ac7916fd85984cfc08ba7d1673705ec5d41..40303b57903367740fd87c2920bb3a61e4417d7a 100644
(file)
--- a/
plugins/mod_register.lua
+++ b/
plugins/mod_register.lua
@@
-35,7
+35,7
@@
module:add_iq_handler("c2s", "jabber:iq:register", function (session, stanza)
local username, host = session.username, session.host;
--session.send(st.error_reply(stanza, "cancel", "not-allowed"));
--return;
local username, host = session.username, session.host;
--session.send(st.error_reply(stanza, "cancel", "not-allowed"));
--return;
-
usermanager_set_password(username, nil, host
); -- Disable account
+
--usermanager_set_password(username, host, nil
); -- Disable account
-- FIXME the disabling currently allows a different user to recreate the account
-- we should add an in-memory account block mode when we have threading
session.send(st.reply(stanza));
-- FIXME the disabling currently allows a different user to recreate the account
-- we should add an in-memory account block mode when we have threading
session.send(st.reply(stanza));
@@
-70,7
+70,7
@@
module:add_iq_handler("c2s", "jabber:iq:register", function (session, stanza)
username = nodeprep(table.concat(username));
password = table.concat(password);
if username == session.username then
username = nodeprep(table.concat(username));
password = table.concat(password);
if username == session.username then
- if usermanager_set_password(username,
password, session.host
) then
+ if usermanager_set_password(username,
session.host, password
) then
session.send(st.reply(stanza));
else
-- TODO unable to write file, file may be locked, etc, what's the correct error?
session.send(st.reply(stanza));
else
-- TODO unable to write file, file may be locked, etc, what's the correct error?