aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-03-21 20:43:42 +0100
committerKim Alvefur <zash@zash.se>2023-03-21 20:43:42 +0100
commit14f896bf2d8f4a00c688b3b020b03a3354a38678 (patch)
tree8e79689c898a95b21e47c46d862a95e00d9189d3 /plugins
parent8c25001712dd98d0951a458c81c8345334488a66 (diff)
downloadprosody-14f896bf2d8f4a00c688b3b020b03a3354a38678.tar.gz
prosody-14f896bf2d8f4a00c688b3b020b03a3354a38678.zip
mod_tokenauth: Fix traceback in get_token_session()
Errors in sha256 becasue `token_secret` is nil since it was not passed to _get_validated_token_info(). Looks like a simple oversight in ebe3b2f96cad
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_tokenauth.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_tokenauth.lua b/plugins/mod_tokenauth.lua
index 087cbb0e..4e4cacee 100644
--- a/plugins/mod_tokenauth.lua
+++ b/plugins/mod_tokenauth.lua
@@ -117,13 +117,13 @@ function get_token_info(token)
end
function get_token_session(token, resource)
- local token_id, token_user, token_host = parse_token(token);
+ local token_id, token_user, token_host, token_secret = parse_token(token);
if not token_id then
module:log("warn", "Failed to verify access token: %s", token_user);
return nil, "invalid-token-format";
end
- local token_info, err = _get_validated_token_info(token_id, token_user, token_host);
+ local token_info, err = _get_validated_token_info(token_id, token_user, token_host, token_secret);
if not token_info then return nil, err; end
return {