From 4d69d875f088f1772beb60751bb4b0288b632f7f Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Sat, 25 Oct 2025 23:05:52 +0200 Subject: [PATCH] FIX Token issue when deleting a line (#35935) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Sécurisation du jeton CSRF pour la suppression de transfert de stock * Sécuriser les actions de suppression de transfert de stock * Corriger l'indentation du lien de suppression de ligne * Supprimer les commentaires français des protections CSRF * Remove CSRF token check for delete actions Removed CSRF token validation for delete actions. --- htdocs/product/stock/stocktransfer/stocktransfer_card.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index 832274dd473..77c6a85c4dd 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -2,6 +2,7 @@ /* Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2024-2025 MDW * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2025 Pierre Ardoin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -884,7 +885,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print img_edit() . ''; print ''; print ''; - print 'id . '">' . img_delete($langs->trans("Remove")) . ''; + // Ensure the delete line link embeds a CSRF token. + $deleteLineUrl = $_SERVER["PHP_SELF"] . '?id=' . $id . '&action=deleteline&lineid=' . $line->id . '&token=' . newToken(); + print '' . img_delete($langs->trans("Remove")) . ''; print ''; }