aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl/scram.lua
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2011-02-24 18:56:19 +0100
committerTobias Markmann <tm@ayena.de>2011-02-24 18:56:19 +0100
commit81d4287169cae382f98d98d1bc9cc7bc8819f11a (patch)
treee6b83d40cd5436283858a044623e56e11b41a06e /util/sasl/scram.lua
parent88b861e694d0e03a2dc2b8d69019baaa70caa154 (diff)
downloadprosody-81d4287169cae382f98d98d1bc9cc7bc8819f11a.tar.gz
prosody-81d4287169cae382f98d98d1bc9cc7bc8819f11a.zip
util.sasl.scram: Fix bug in validate_username function. (Thanks Florob)
Diffstat (limited to 'util/sasl/scram.lua')
-rw-r--r--util/sasl/scram.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/sasl/scram.lua b/util/sasl/scram.lua
index a9538c37..aad33ebc 100644
--- a/util/sasl/scram.lua
+++ b/util/sasl/scram.lua
@@ -79,13 +79,13 @@ end
local function validate_username(username)
-- check for forbidden char sequences
for eq in username:gmatch("=(.?.?)") do
- if eq ~= "2D" and eq ~= "3D" then
+ if eq ~= "2C" and eq ~= "3D" then
return false
end
end
- -- replace =2D with , and =3D with =
- username = username:gsub("=2D", ",");
+ -- replace =2C with , and =3D with =
+ username = username:gsub("=2C", ",");
username = username:gsub("=3D", "=");
-- apply SASLprep