Software /
code /
prosody
Comparison
util/sasl.lua @ 2180:8de2f7f5b870 sasl
Allow ampersands in passwords for SASL PLAIN mechanism.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Fri, 28 Aug 2009 19:20:12 +0200 |
parent | 2179:c985536d5452 |
child | 2181:d5cd6a868959 |
comparison
equal
deleted
inserted
replaced
2179:c985536d5452 | 2180:8de2f7f5b870 |
---|---|
117 | 117 |
118 --========================= | 118 --========================= |
119 --SASL PLAIN | 119 --SASL PLAIN |
120 local function sasl_mechanism_plain(self, message) | 120 local function sasl_mechanism_plain(self, message) |
121 local response = message | 121 local response = message |
122 local authorization = s_match(response, "([^&%z]+)") | 122 local authorization = s_match(response, "([^%z]+)") |
123 local authentication = s_match(response, "%z([^&%z]+)%z") | 123 local authentication = s_match(response, "%z([^%z]+)%z") |
124 local password = s_match(response, "%z[^&%z]+%z([^&%z]+)") | 124 local password = s_match(response, "%z[^%z]+%z([^%z]+)") |
125 | 125 |
126 if authentication == nil or password == nil then | 126 if authentication == nil or password == nil then |
127 return "failure", "malformed-request"; | 127 return "failure", "malformed-request"; |
128 end | 128 end |
129 | 129 |