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 ''; }