projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net.dns: Remove elements from the cache when expired so as to not leave holes in...
[prosody.git]
/
plugins
/
mod_legacyauth.lua
diff --git
a/plugins/mod_legacyauth.lua
b/plugins/mod_legacyauth.lua
index c4fec39fee17dd3cb22239cd7b715c2cc1c252de..9a9c3902f0dfe242ce3b435056fb06787edd21ca 100644
(file)
--- a/
plugins/mod_legacyauth.lua
+++ b/
plugins/mod_legacyauth.lua
@@
-42,7
+42,6
@@
module:add_iq_handler("c2s_unauthed", "jabber:iq:auth",
:tag("username"):up()
:tag("password"):up()
:tag("resource"):up());
:tag("username"):up()
:tag("password"):up()
:tag("resource"):up());
- return true;
else
username, password, resource = t_concat(username), t_concat(password), t_concat(resource);
local reply = st.reply(stanza);
else
username, password, resource = t_concat(username), t_concat(password), t_concat(resource);
local reply = st.reply(stanza);
@@
-54,19
+53,13
@@
module:add_iq_handler("c2s_unauthed", "jabber:iq:auth",
success, err_type, err, err_msg = sessionmanager.bind_resource(session, resource);
if not success then
session.send(st.error_reply(stanza, err_type, err, err_msg));
success, err_type, err, err_msg = sessionmanager.bind_resource(session, resource);
if not success then
session.send(st.error_reply(stanza, err_type, err, err_msg));
- return true;
+ return true;
-- FIXME need to unauthenticate here
end
end
session.send(st.reply(stanza));
end
end
session.send(st.reply(stanza));
- return true;
else
else
- local reply = st.reply(stanza);
- reply.attr.type = "error";
- reply:tag("error", { code = "401", type = "auth" })
- :tag("not-authorized", { xmlns = "urn:ietf:params:xml:ns:xmpp-stanzas" });
- session.send(reply);
- return true;
+ session.send(st.error_reply(stanza, "auth", "not-authorized"));
end
end
end
end
-
+ return true;
end);
end);