Code comment

This commit is contained in:
Laurent Destailleur 2022-09-17 14:08:21 +02:00
parent ad2625f842
commit d02ec266d4
2 changed files with 2 additions and 4 deletions

View File

@ -526,12 +526,13 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt(
$arrayofactiontoforcetokencheck = array(
'activate',
'doprev', 'donext', 'dvprev', 'dvnext',
'install',
'freezone', 'install',
'reopen'
);
if (in_array(GETPOST('action', 'aZ09'), $arrayofactiontoforcetokencheck)) {
$sensitiveget = true;
}
// We also match for value with just a simple string that must match
if (preg_match('/^(add|classify|close|confirm|copy|del|disable|enable|remove|set|unset|update|save)/', GETPOST('action', 'aZ09'))) {
$sensitiveget = true;
}

View File

@ -50,11 +50,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
$hookmanager->initHooks(array('takeposinvoice'));
global $mysoc;
$langs->loadLangs(array("companies", "commercial", "bills", "cashdesk", "stocks", "banks"));
$id = GETPOST('id', 'int');