Mercurial > prosody-hg
comparison plugins/mod_legacyauth.lua @ 6054:7a5ddbaf758d
Merge 0.9->0.10
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 02 Apr 2014 17:41:38 +0100 |
| parents | bd0ff8ae98a8 |
| children | 76699a0ae4c4 |
comparison
equal
deleted
inserted
replaced
| 6053:2f93a04564b2 | 6054:7a5ddbaf758d |
|---|---|
| 1 -- Prosody IM | 1 -- Prosody IM |
| 2 -- Copyright (C) 2008-2010 Matthew Wild | 2 -- Copyright (C) 2008-2010 Matthew Wild |
| 3 -- Copyright (C) 2008-2010 Waqas Hussain | 3 -- Copyright (C) 2008-2010 Waqas Hussain |
| 4 -- | 4 -- |
| 5 -- This project is MIT/X11 licensed. Please see the | 5 -- This project is MIT/X11 licensed. Please see the |
| 6 -- COPYING file in the source package for more information. | 6 -- COPYING file in the source package for more information. |
| 7 -- | 7 -- |
| 8 | 8 |
| 9 | 9 |
| 41 | 41 |
| 42 if secure_auth_only and not session.secure then | 42 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")); | 43 session.send(st.error_reply(stanza, "modify", "not-acceptable", "Encryption (SSL or TLS) is required to connect to this server")); |
| 44 return true; | 44 return true; |
| 45 end | 45 end |
| 46 | 46 |
| 47 local username = stanza.tags[1]:child_with_name("username"); | 47 local username = stanza.tags[1]:child_with_name("username"); |
| 48 local password = stanza.tags[1]:child_with_name("password"); | 48 local password = stanza.tags[1]:child_with_name("password"); |
| 49 local resource = stanza.tags[1]:child_with_name("resource"); | 49 local resource = stanza.tags[1]:child_with_name("resource"); |
| 50 if not (username and password and resource) then | 50 if not (username and password and resource) then |
| 51 local reply = st.reply(stanza); | 51 local reply = st.reply(stanza); |
