From 46352e6a7f7cfdcf3bbf5c92d340400e952ab5cc Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Wed, 27 Sep 2023 18:43:13 +0200 Subject: [PATCH] fix cached_jwt_verify signature --- access.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/access.lua b/access.lua index abde49d..c5c3e76 100644 --- a/access.lua +++ b/access.lua @@ -25,7 +25,7 @@ local conf = config.get_config() local cache = ngx.shared.cache -- Hash a string using hmac_sha512, return a hexa string -function cached_jwt_verify(data, method, secret) +function cached_jwt_verify(data, secret) res = cache:get(data) if res == nil then logger:debug("Result not found in cache, checking login") @@ -96,7 +96,7 @@ function check_authentication() return false, nil, nil end - user, pwd, err = cached_jwt_verify(cookie, "H256", cookie_secret) + user, pwd, err = cached_jwt_verify(cookie, cookie_secret) -- FIXME : maybe also check that the cookie was delivered for the requested domain (or a parent?)