Software /
code /
prosody
Comparison
util/sasl.lua @ 1724:7682a34c13d0
util.sasl: Fix 2 global sets (one a tpyo)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 20 Aug 2009 04:15:41 +0100 |
parent | 1723:2145daff1a65 |
child | 1725:fb3137652ea6 |
comparison
equal
deleted
inserted
replaced
1723:2145daff1a65 | 1724:7682a34c13d0 |
---|---|
50 elseif correct_password == false then return "failure", "account-disabled" end | 50 elseif correct_password == false then return "failure", "account-disabled" end |
51 | 51 |
52 local claimed_password = "" | 52 local claimed_password = "" |
53 if password_encoding == nil then claimed_password = password | 53 if password_encoding == nil then claimed_password = password |
54 else claimed_password = password_encoding(password) end | 54 else claimed_password = password_encoding(password) end |
55 caimed_password = saslprep(claimed_password); | 55 claimed_password = saslprep(claimed_password); |
56 | 56 |
57 self.username = authentication | 57 self.username = authentication |
58 if claimed_password == correct_password then | 58 if claimed_password == correct_password then |
59 return "success" | 59 return "success" |
60 else | 60 else |
131 end | 131 end |
132 end | 132 end |
133 return t_concat(p); | 133 return t_concat(p); |
134 end | 134 end |
135 local function parse(data) | 135 local function parse(data) |
136 message = {} | 136 local message = {} |
137 for k, v in gmatch(data, [[([%w%-]+)="?([^",]*)"?,?]]) do -- FIXME The hacky regex makes me shudder | 137 for k, v in gmatch(data, [[([%w%-]+)="?([^",]*)"?,?]]) do -- FIXME The hacky regex makes me shudder |
138 message[k] = v; | 138 message[k] = v; |
139 end | 139 end |
140 return message; | 140 return message; |
141 end | 141 end |