Software /
code /
prosody
Comparison
plugins/mod_legacyauth.lua @ 10557:e1cb869e2f6c
mod_legacyauth: Report failure from sessionmanager (mostly invalid username)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 23 Dec 2019 23:11:28 +0100 |
parent | 8768:bd88ca43d77a |
child | 12328:a80314101bc6 |
comparison
equal
deleted
inserted
replaced
10556:79fe4ed1332b | 10557:e1cb869e2f6c |
---|---|
76 elseif resource ~= session.resource then -- server changed resource, not supported by legacy auth | 76 elseif resource ~= session.resource then -- server changed resource, not supported by legacy auth |
77 session.send(st.error_reply(stanza, "cancel", "conflict", "The requested resource could not be assigned to this session.")); | 77 session.send(st.error_reply(stanza, "cancel", "conflict", "The requested resource could not be assigned to this session.")); |
78 session:close(); -- FIXME undo resource bind and auth instead of closing the session? | 78 session:close(); -- FIXME undo resource bind and auth instead of closing the session? |
79 return true; | 79 return true; |
80 end | 80 end |
81 session.send(st.reply(stanza)); | |
82 else | |
83 session.send(st.error_reply(stanza, "auth", "not-authorized", err)); | |
81 end | 84 end |
82 session.send(st.reply(stanza)); | |
83 else | 85 else |
84 session.send(st.error_reply(stanza, "auth", "not-authorized")); | 86 session.send(st.error_reply(stanza, "auth", "not-authorized")); |
85 end | 87 end |
86 end | 88 end |
87 return true; | 89 return true; |