aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2008-08-26 01:01:13 +0200
committerTobias Markmann <tm@ayena.de>2008-08-26 01:01:13 +0200
commit0b6ee8b38ad4a7bc89abb54df4c485ab2bb944c9 (patch)
tree187a249621dce092bd482e0a7464650ad54567df /util
parenta7012d49236954006b922d2f41ecadf87b105d1f (diff)
downloadprosody-0b6ee8b38ad4a7bc89abb54df4c485ab2bb944c9.tar.gz
prosody-0b6ee8b38ad4a7bc89abb54df4c485ab2bb944c9.zip
* missing base64 decode of SASL response
Diffstat (limited to 'util')
-rw-r--r--util/sasl.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/sasl.lua b/util/sasl.lua
index 3f82350b..6e85c985 100644
--- a/util/sasl.lua
+++ b/util/sasl.lua
@@ -8,7 +8,7 @@ function sasl:new_plain(onAuth, onSuccess, onFail, onWrite)
object.feed = function(self, stanza)
if (stanza.name ~= "response") then self.onFail() end
if (stanza.attr.xmlns ~= "urn:ietf:params:xml:ns:xmpp-sasl") then self.onFail() end
- local response = stanza.tag[1]
+ local response = base64.decode(stanza.tag[1])
local authorization = string.match(response, [[([^&\0]+)]])
local authentication = string.match(response, [[\0([^&\0]+)\0]])
local password = string.match(response, [[\0[^&\0]+\0([^&\0]+)]])