Changeset

5273:40be37652d70

mod_http_oauth2: Fix traceback on missing 'scope' parameter parse_scopes() takes a string and it is not optional
author Kim Alvefur <zash@zash.se>
date Fri, 24 Mar 2023 00:07:58 +0100
parents 5272:acab61ba7f02
children 5274:8cfbcbc0fb89
files mod_http_oauth2/mod_http_oauth2.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Thu Mar 23 16:48:18 2023 +0100
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Fri Mar 24 00:07:58 2023 +0100
@@ -527,7 +527,7 @@
 		return render_page(templates.login, { state = auth_state, client = client });
 	elseif auth_state.consent == nil then
 		-- Render consent page
-		return render_page(templates.consent, { state = auth_state; client = client; scopes = parse_scopes(params.scope) }, true);
+		return render_page(templates.consent, { state = auth_state; client = client; scopes = parse_scopes(params.scope or "") }, true);
 	elseif not auth_state.consent then
 		-- Notify client of rejection
 		return error_response(request, oauth_error("access_denied"));