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.
--- 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);