mod_http_oauth2: Fix error if no scopes requested
granted_scopes would be nil but the later code expects an array
--- 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);