mod_console: Don't allow bang bang as the first command in a session, or when the...
[prosody.git] / util / sasl / scram.lua
index de848b3da32726de6ce22a5f0a1eb235709fce7a..c846a7d12fb60f472b8007754b1394e67eb29675 100644 (file)
@@ -65,9 +65,9 @@ local function binaryXOR( a, b )
 end
 
 -- hash algorithm independent Hi(PBKDF2) implementation
-local function Hi(hmac, str, salt, i)
+function Hi(hmac, str, salt, i)
        local Ust = hmac(str, salt.."\0\0\0\1");
-       local res = Ust;        
+       local res = Ust;
        for n=1,i-1 do
                local Und = hmac(str, Ust)
                res = binaryXOR(res, Und)
@@ -80,8 +80,8 @@ local function validate_username(username)
        -- check for forbidden char sequences
        for eq in username:gmatch("=(.?.?)") do
                if eq ~= "2D" and eq ~= "3D" then
-                       return false 
-               end 
+                       return false
+               end
        end
        
        -- replace =2D with , and =3D with =