# HG changeset patch # User Tobias Markmann # Date 1258453919 -3600 # Node ID 1509cabb8321fa965771477630e1b8f3d4a47c83 # Parent 614c839c30c5d5df25b03b9c249b1a6e57d6364d Add check for forbidden char sequences in validate_username(). diff -r 614c839c30c5 -r 1509cabb8321 util/sasl/scram.lua --- a/util/sasl/scram.lua Tue Nov 17 11:03:54 2009 +0100 +++ b/util/sasl/scram.lua Tue Nov 17 11:31:59 2009 +0100 @@ -60,7 +60,8 @@ local function validate_username(username) -- check for forbidden char sequences - + for eq in s:gmatch("=(.?.?)") do + if eq ~= "2D" and eq ~= "3D" then return false end end return true; -- replace =2D with , and =3D with = -- apply SASLprep