Diff

mod_http_oauth2/mod_http_oauth2.lua @ 5419:a0333176303c

mod_http_oauth2: Fix error if no scopes requested granted_scopes would be nil but the later code expects an array
author Kim Alvefur <zash@zash.se>
date Fri, 05 May 2023 21:32:34 +0200
parent 5418:f2c7bb3af600
child 5420:aa068449b0b6
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Fri May 05 01:23:13 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Fri May 05 21:32:34 2023 +0200
@@ -133,6 +133,8 @@
 
 	if requested_scope_string then -- Specific role(s) requested
 		granted_scopes, requested_roles = split_scopes(parse_scopes(requested_scope_string));
+	else
+		granted_scopes = array();
 	end
 
 	local selected_role = select_role(username, requested_roles);