Skip to content

Commit

Permalink
Amend the fix to include delete_supplier (#3332)
Browse files Browse the repository at this point in the history
  • Loading branch information
jekkos committed Oct 4, 2021
1 parent f1672d9 commit 329f177
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/hooks/method_hook.php
Expand Up @@ -5,12 +5,12 @@ function validate_method()

$url = $_SERVER['REQUEST_URI'];

$post_required = preg_match('/(save|delete|delete_item)\/?\d*?/', $url);
$post_required = preg_match('/(save|delete*|remove*)\/?\d*?/', $url);

if($post_required && $_SERVER["REQUEST_METHOD"] != "POST" && empty($_POST))
{
echo "Method not allowed";
die;
}

}
}

0 comments on commit 329f177

Please sign in to comment.