Skip to content

Commit 7b78307

Browse files
committed
use hmac_hash
1 parent 57c0ad6 commit 7b78307

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lualib/snax/msgserver.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ function server.start(conf)
178178
end
179179

180180
local text = string.format("%s:%s", username, index)
181-
local v = crypt.hmac64(crypt.hashkey(text), u.secret)
181+
local v = crypt.hmac_hash(u.secret, text) -- equivalent to crypt.hmac64(crypt.hashkey(text), u.secret)
182182
if v ~= hmac then
183183
return "401 Unauthorized"
184184
end

0 commit comments

Comments
 (0)