# HG changeset patch # User Kim Alvefur # Date 1684334407 -7200 # Node ID dacde53467f389fc0ba54667b1d248d1b20a2475 # Parent f6d8830a83fe08a92ca665f5680d4d44191363c2 mod_http_oauth2: Proper OAuth error for invalid redirect URI in implicit flow too diff -r f6d8830a83fe -r dacde53467f3 mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Wed May 17 16:34:19 2023 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Wed May 17 16:40:07 2023 +0200 @@ -369,7 +369,7 @@ local token_info = new_access_token(granted_jid, granted_role, granted_scopes, client, nil); local redirect = url.parse(get_redirect_uri(client, params.redirect_uri)); - if not redirect then return 400; end + if not redirect then return oauth_error("invalid_redirect_uri"); end token_info.state = params.state; redirect.fragment = http.formencode(token_info);