Software /
code /
prosody-modules
Changeset
5229:c24a622a7b85
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 10 Mar 2023 11:54:30 +0100 |
parents | 5228:77cd01af06a9 |
children | 5230:ac252db71027 |
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 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() });