mod_http_oauth2/mod_http_oauth2.lua
changeset 5398 434ee49b04de
parent 5397 9b9d612f9083
child 5400 ac7c5669e5f5
--- a/mod_http_oauth2/mod_http_oauth2.lua	Sun Apr 30 16:58:53 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Sun Apr 30 17:16:47 2023 +0200
@@ -729,7 +729,7 @@
 local function redirect_uri_allowed(redirect_uri, client_uri, app_type)
 	local uri = url.parse(redirect_uri);
 	if app_type == "native" then
-		return uri.scheme == "http" and uri.host == "localhost" or uri.scheme ~= "https";
+		return uri.scheme == "http" and loopbacks:contains(uri.host) or uri.scheme ~= "https";
 	elseif app_type == "web" then
 		return uri.scheme == "https" and uri.host == client_uri.host;
 	end