58 return res |
58 return res |
59 end |
59 end |
60 |
60 |
61 local function validate_username(username) |
61 local function validate_username(username) |
62 -- check for forbidden char sequences |
62 -- check for forbidden char sequences |
63 |
63 for eq in s:gmatch("=(.?.?)") do |
|
64 if eq ~= "2D" and eq ~= "3D" then return false end end return true; |
64 -- replace =2D with , and =3D with = |
65 -- replace =2D with , and =3D with = |
65 |
66 |
66 -- apply SASLprep |
67 -- apply SASLprep |
67 return username; |
68 return username; |
68 end |
69 end |