# HG changeset patch # User Kim Alvefur # Date 1678445670 -3600 # Node ID c24a622a7b8572ba86ef5baf25e6ccb1ed9301a1 # Parent 77cd01af06a9fd3e5871105ebdf4280ab3ddaac2 mod_http_oauth2: Fix appending of query parts in error redirects Looks like this meant to check whether the redirect_uri has a ?query part, but forgot to inspect the field for this in the returned table. diff -r 77cd01af06a9 -r c24a622a7b85 mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Thu Mar 09 14:46:06 2023 +0100 +++ b/mod_http_oauth2/mod_http_oauth2.lua Fri Mar 10 11:54:30 2023 +0100 @@ -429,7 +429,7 @@ return render_page(templates.error, { error = err }); end local redirect_query = url.parse(redirect_uri); - local sep = redirect_query and "&" or "?"; + local sep = redirect_query.query and "&" or "?"; redirect_uri = redirect_uri .. sep .. http.formencode(err.extra.oauth2_response) .. "&" .. http.formencode({ state = q.state, iss = get_issuer() });