changeset 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
parents f3123cbbd894
children d3b2d42daaee
files mod_http_oauth2/mod_http_oauth2.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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