Mercurial > prosody-hg
comparison plugins/mod_legacyauth.lua @ 8768:bd88ca43d77a
mod_legacyauth: Split a long line [luacheck]
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 01 May 2018 20:45:22 +0200 |
| parents | edc63dc72566 |
| children | e1cb869e2f6c |
comparison
equal
deleted
inserted
replaced
| 8767:7738838a013d | 8768:bd88ca43d77a |
|---|---|
| 33 | 33 |
| 34 module:hook("stanza/iq/jabber:iq:auth:query", function(event) | 34 module:hook("stanza/iq/jabber:iq:auth:query", function(event) |
| 35 local session, stanza = event.origin, event.stanza; | 35 local session, stanza = event.origin, event.stanza; |
| 36 | 36 |
| 37 if session.type ~= "c2s_unauthed" then | 37 if session.type ~= "c2s_unauthed" then |
| 38 (session.sends2s or session.send)(st.error_reply(stanza, "cancel", "service-unavailable", "Legacy authentication is only allowed for unauthenticated client connections.")); | 38 (session.sends2s or session.send)(st.error_reply(stanza, "cancel", "service-unavailable", |
| 39 "Legacy authentication is only allowed for unauthenticated client connections.")); | |
| 39 return true; | 40 return true; |
| 40 end | 41 end |
| 41 | 42 |
| 42 if secure_auth_only and not session.secure then | 43 if secure_auth_only and not session.secure then |
| 43 session.send(st.error_reply(stanza, "modify", "not-acceptable", "Encryption (SSL or TLS) is required to connect to this server")); | 44 session.send(st.error_reply(stanza, "modify", "not-acceptable", "Encryption (SSL or TLS) is required to connect to this server")); |
