Diff

mod_http_oauth2/mod_http_oauth2.lua @ 5252:85f0c6c1c24f

mod_http_oauth2: Fix attempt to index a boolean value _This_ function signature strikes again It returns true, payload, but only passed the boolean on in place of the client, tripping up client_subset()
author Kim Alvefur <zash@zash.se>
date Thu, 16 Mar 2023 00:06:43 +0100
parent 5248:b8b2bf0c1b4b
child 5254:b0ccdd12a70d
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Tue Mar 14 18:59:39 2023 +0000
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Thu Mar 16 00:06:43 2023 +0100
@@ -276,8 +276,8 @@
 		return oauth_error("invalid_scope", "unknown scope requested");
 	end
 
-	local client = jwt_verify(params.client_id);
-	if not client then
+	local client_ok, client = jwt_verify(params.client_id);
+	if not client_ok then
 		return oauth_error("invalid_client", "incorrect credentials");
 	end