FIX HTML injection vulnerability in Dolibarr Application Home Page

FIX #GHSA-7947-48q7-cp5m
This commit is contained in:
Laurent Destailleur 2024-01-25 17:51:09 +01:00
parent ea7e7456a5
commit 49b5c081d6
2 changed files with 2 additions and 1 deletions

View file

@ -34,7 +34,7 @@ if (!defined('DOL_APPLICATION_TITLE')) {
define('DOL_APPLICATION_TITLE', 'Dolibarr');
}
if (!defined('DOL_VERSION')) {
define('DOL_VERSION', '18.0.4'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
define('DOL_VERSION', '18.0.5'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
}
if (!defined('EURO')) {

View file

@ -2164,6 +2164,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
if (isset($_POST) && is_array($_POST)) {
foreach ($_POST as $key => $value) {
$key = preg_replace('/[^a-z0-9_\-\[\]/i', '', $key);
if (in_array($key, array('action', 'massaction', 'password'))) {
continue;
}