# HG changeset patch # User Kim Alvefur # Date 1684334059 -7200 # Node ID f6d8830a83fe08a92ca665f5680d4d44191363c2 # Parent 06640647d193f170bcfb39ca167c68d2cea8b681 mod_http_oauth2: Return proper OAuth error for invalid redirect URI An unspecific status code of 400 isn't very helpful, this should at least provide a hint as to what is wrong. diff -r 06640647d193 -r f6d8830a83fe mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Wed May 17 13:51:30 2023 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Wed May 17 16:34:19 2023 +0200 @@ -337,7 +337,7 @@ }) or ("Here's your authorization code:\n%s\n"):format(code); return response; elseif not redirect_uri then - return 400; + return oauth_error("invalid_redirect_uri"); end local redirect = url.parse(redirect_uri);