Use anchor in supplier regex (#3402)

Adding a unit test to check the url patterns allowed/disallowed would be a good idea. I should practice what I preach.
This commit is contained in:
jekkos committed 2022-01-12 00:34:16 +01:00
1 parent 6e1db1458b
commit 730ec1292d
1 file changed
+1 -1
+1 -1
View File
@@ -5,7 +5,7 @@ function validate_method()
$url = $_SERVER['REQUEST_URI'];
$post_required = preg_match('/(save|delete*|remove*)\/?\d*?/', $url);
$post_required = preg_match('/\/(save|delete*|remove*)\/?\d*?/', $url);
if($post_required && $_SERVER["REQUEST_METHOD"] != "POST" && empty($_POST))
{