From bbbbb56c6455514dcd0acca53afc17a92ed21bb9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 29 Apr 2026 02:38:59 +0200 Subject: [PATCH] Better sanitization param for GETPOST of htmlheader of website page --- htdocs/website/class/websitepage.class.php | 5 +++++ htdocs/website/index.php | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index 83b8472d2b5..bcd1c550a90 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -279,6 +279,11 @@ class WebsitePage extends CommonObject // Remove spaces and be sure we have main language only $this->lang = preg_replace('/[_-].*$/', '', trim($this->lang)); // en_US or en-US -> en + // Check there is no PHP into HTML header + $dataposted = trim($this->htmlheader); // Must accept tags like '