From 258802628325dce49c17d9e5284622c737a875e7 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Thu, 24 Feb 2011 18:56:19 +0100 Subject: util.sasl.scram: Fix bug in validate_username function. (Thanks Florob) --- util/sasl/scram.lua | 6 +++--- 1 file 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 -- cgit v1.2.3