This commit is contained in:
Laurent Destailleur 2024-09-09 23:10:34 +02:00
parent 565ad9cdf1
commit ffeef2f058

View File

@ -286,6 +286,7 @@ if ($action == 'install' && $allowonlineinstall) {
}
if ($action == 'set' && $user->admin) {
// We made some check against evil eternal modules that try to low security options.
$checkOldValue = getDolGlobalInt('CHECKLASTVERSION_EXTERNALMODULE');
$csrfCheckOldValue = getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN');
$resarray = activateModule($value);
@ -295,6 +296,7 @@ if ($action == 'set' && $user->admin) {
if ($csrfCheckOldValue != getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN')) {
setEventMessage($langs->trans('WarningModuleHasChangedSecurityCsrfParameter', $value), 'warnings');
}
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if (!empty($resarray['errors'])) {
setEventMessages('', $resarray['errors'], 'errors');