# HG changeset patch # User Tobias Markmann # Date 1298570179 -3600 # Node ID edd7b0610c2cace9f59b0a1f3051347359d0cbbb # Parent e3d937eec3fae719b186bc1e52588258631faf81 util.sasl.scram: Fix bug in validate_username function. (Thanks Florob) diff -r e3d937eec3fa -r edd7b0610c2c util/sasl/scram.lua --- a/util/sasl/scram.lua Thu Feb 24 19:30:26 2011 +0500 +++ b/util/sasl/scram.lua Thu Feb 24 18:56:19 2011 +0100 @@ -79,13 +79,13 @@ 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