Changeset

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
parents 5418:f2c7bb3af600
children 5420:aa068449b0b6
files mod_http_oauth2/mod_http_oauth2.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
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);