diff --git a/api/public/cors.php b/api/public/cors.php index 1cd68d2cfb..55fd2d0d6d 100644 --- a/api/public/cors.php +++ b/api/public/cors.php @@ -27,7 +27,7 @@ $is_question = false; } -if (str_pos($scriptname, '..') !== false +if (strpos($scriptname, '..') !== false || strpos($scriptname, '/') !== false || strpos($scriptname, '\\') !== false) { die("No such script here.");