# HG changeset patch # User Kim Alvefur # Date 1679612878 -3600 # Node ID 40be37652d7039dcd048f7f72e981a31aa47b602 # Parent acab61ba7f02e6413e30863d6a7cb1c2491a3037 mod_http_oauth2: Fix traceback on missing 'scope' parameter parse_scopes() takes a string and it is not optional diff -r acab61ba7f02 -r 40be37652d70 mod_http_oauth2/mod_http_oauth2.lua --- 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"));