Software /
code /
prosody
Changeset
4205:ffa5384130a7
util.sasl.scram: Fix bug in validate_username function. (Thanks Florob)
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Thu, 24 Feb 2011 18:56:19 +0100 |
parents | 4202:dff7df4a191b |
children | 4206:c88f646a34d3 4207:06eb75d071ec |
files | util/sasl/scram.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/util/sasl/scram.lua Thu Feb 24 07:11:35 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