diff --git a/route.php b/route.php index f2bc1dd..322ba66 100644 --- a/route.php +++ b/route.php @@ -190,7 +190,7 @@ class route // Allow to redirect from POST to GET, but not GET to GET (can loop) if ($destURL === $requestURL && $_SERVER["REQUEST_METHOD"] === "GET") throw new Exception ("Redirect to myself", 508); - if (substr_count ("../", $baseURL) > 1+ substr_count ("/", $destURL)) + if (substr_count ($baseURL, "../") > 1+ substr_count ($destURL,"/")) throw new Exception ("Can't redirect outside this site (Base $baseURL)", 405);