# HG changeset patch # User Tobias Markmann # Date 1251480012 -7200 # Node ID 8de2f7f5b870a63002f8f479b64173568b34f051 # Parent c985536d5452f8a24e9066337644b63b0ee37a08 Allow ampersands in passwords for SASL PLAIN mechanism. diff -r c985536d5452 -r 8de2f7f5b870 util/sasl.lua --- a/util/sasl.lua Fri Aug 28 13:04:38 2009 +0200 +++ b/util/sasl.lua Fri Aug 28 19:20:12 2009 +0200 @@ -119,9 +119,9 @@ --SASL PLAIN local function sasl_mechanism_plain(self, message) local response = message - local authorization = s_match(response, "([^&%z]+)") - local authentication = s_match(response, "%z([^&%z]+)%z") - local password = s_match(response, "%z[^&%z]+%z([^&%z]+)") + local authorization = s_match(response, "([^%z]+)") + local authentication = s_match(response, "%z([^%z]+)%z") + local password = s_match(response, "%z[^%z]+%z([^%z]+)") if authentication == nil or password == nil then return "failure", "malformed-request";