Changeset

12959:e331210beeb2

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
author Kim Alvefur <zash@zash.se>
date Tue, 21 Mar 2023 20:43:42 +0100
parents 12958:640476114eb6
children 12960:31b22cc221b5
files plugins/mod_tokenauth.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_tokenauth.lua	Tue Mar 21 18:59:19 2023 +0000
+++ b/plugins/mod_tokenauth.lua	Tue Mar 21 20:43:42 2023 +0100
@@ -117,13 +117,13 @@
 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 {