aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-09-30 21:35:39 +0100
committerMatthew Wild <mwild1@gmail.com>2008-09-30 21:35:39 +0100
commit298bb340b2eea44f10de6efe45f361f9f6893a12 (patch)
tree361e6dc0c08da08958f7b5e89056d6d3c8330f54 /util/sasl.lua
parent55e1d561e71a2a49cec3bf424ce5f5197586ee9f (diff)
downloadprosody-298bb340b2eea44f10de6efe45f361f9f6893a12.tar.gz
prosody-298bb340b2eea44f10de6efe45f361f9f6893a12.zip
Fix quoting in util/sasl.lua
Diffstat (limited to 'util/sasl.lua')
-rw-r--r--util/sasl.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/sasl.lua b/util/sasl.lua
index fb3aff94..0d7740c8 100644
--- a/util/sasl.lua
+++ b/util/sasl.lua
@@ -10,9 +10,9 @@ function sasl:new_plain(onAuth, onSuccess, onFail, onWrite)
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 = 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]+)]])
+ local authorization = string.match(response, "([^&\0]+)")
+ local authentication = string.match(response, "\0([^&\0]+)\0")
+ local password = string.match(response, "\0[^&\0]+\0([^&\0]+)")
if self.onAuth(authorization, password) == true then
self.onWrite(stanza.stanza("success", {xmlns = "urn:ietf:params:xml:ns:xmpp-sasl"}))
self.onSuccess()