Update missing CSRF endpoint checks

This commit is contained in:
johnnyq
2026-07-24 13:16:51 -04:00
parent e7698f15bd
commit 91a1676e89
10 changed files with 38 additions and 5 deletions

View File

@@ -174,6 +174,8 @@ if (isset($_POST['bulk_delete_networks'])) {
if (isset($_POST['export_networks_csv'])) {
validateCSRFToken($_POST['csrf_token']);
enforceUserPermission('module_support');
if ($_POST['client_id']) {

View File

@@ -246,6 +246,8 @@ if (isset($_POST['bulk_delete_products'])) {
if (isset($_POST['export_products_csv'])) {
validateCSRFToken($_POST['csrf_token']);
//get records from database
$sql = mysqli_query($mysqli,"SELECT * FROM products
LEFT JOIN categories ON product_category_id = category_id
@@ -293,6 +295,8 @@ if (isset($_POST['export_products_csv'])) {
if (isset($_POST['add_product_stock'])) {
validateCSRFToken($_POST['csrf_token']);
enforceUserPermission('module_sales', 2);
$product_id = intval($_POST['product_id']);

View File

@@ -8,6 +8,8 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
if (isset($_POST['add_tag'])) {
validateCSRFToken($_POST['csrf_token']);
require_once 'tag_model.php';
mysqli_query($mysqli,"INSERT INTO tags SET tag_name = '$name', tag_type = $type, tag_color = '$color', tag_icon = '$icon'");