From 27698ab5c7746dd167a49841bedf744978b51be4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 17 Oct 2020 14:01:09 +0200 Subject: [PATCH] Protect page for module management with token even for GET action --- htdocs/admin/modules.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 3ca08f90900..61319189825 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -28,6 +28,8 @@ * \brief Page to activate/disable all modules */ +if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN','1'); // Force use of CSRF protection with tokens even for GET + require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -701,11 +703,11 @@ if ($mode == 'common' || $mode == 'commonkanban') if (!empty($conf->multicompany->enabled) && $user->entity) $disableSetup++; } else { if (!empty($objMod->warnings_unactivation[$mysoc->country_code]) && method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) { - $codeenabledisable .= 'warnings_unactivation[$mysoc->country_code].'&value='.$modName.'&mode='.$mode.$param.'">'; + $codeenabledisable .= 'warnings_unactivation[$mysoc->country_code].'&value='.$modName.'&mode='.$mode.$param.'">'; $codeenabledisable .= img_picto($langs->trans("Activated"), 'switch_on'); $codeenabledisable .= ''; } else { - $codeenabledisable .= ''; + $codeenabledisable .= ''; $codeenabledisable .= img_picto($langs->trans("Activated"), 'switch_on'); $codeenabledisable .= ''; } @@ -1151,8 +1153,6 @@ if ($mode == 'develop') print ''."\n"; print ''; - //span class="fa fa-bug"> - //print ''; print '
'; print ''; print ''.$langs->trans("TryToUseTheModuleBuilder", $langs->transnoentitiesnoconv("ModuleBuilder")).'';