From 21d22fcbc3ea1ddd93572892310cf74875954693 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Feb 2025 13:08:55 +0100 Subject: [PATCH 1/2] Update index.php --- htdocs/website/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index bc96a9213d4..8873c257cf5 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2974,6 +2974,8 @@ if ($action == 'generatesitemaps' && $usercanedit) { if ($action == 'removecspsource' && $usercanedit) { $db->begin(); + + $sourcetype = ""; $sourcecsp = explode("_", GETPOST("sourcecsp")); $directive = $sourcecsp[0]; $sourcekey = !empty($sourcecsp[1]) ? $sourcecsp[1] : null; @@ -2988,7 +2990,7 @@ if ($action == 'removecspsource' && $usercanedit) { $error++; } - $directivetype = $directivesarray[$directive]["data-directivetype"]; + $directivetype = (string) $directivesarray[$directive]["data-directivetype"]; if (isset($sourcekey)) { $sourcetype = $sourcesarray[$directivetype][$sourcekey]["data-sourcetype"]; } @@ -3044,6 +3046,7 @@ if ($action == 'removecspsource' && $usercanedit) { $db->rollback(); setEventMessages($langs->trans("ErrorRemovingSecurityPolicy"), null, 'errors'); } + header("Location: ".$_SERVER["PHP_SELF"].'?websiteid='.$websiteid."&action=editsecurity"); exit(); } From 8e61c27793f859f421c94d5d7f8a6a277ade4bb2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Feb 2025 13:20:04 +0100 Subject: [PATCH 2/2] Update index.php --- htdocs/website/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 8873c257cf5..dd68e9cd65e 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2974,7 +2974,7 @@ if ($action == 'generatesitemaps' && $usercanedit) { if ($action == 'removecspsource' && $usercanedit) { $db->begin(); - + $sourcetype = ""; $sourcecsp = explode("_", GETPOST("sourcecsp")); $directive = $sourcecsp[0]; @@ -3046,7 +3046,7 @@ if ($action == 'removecspsource' && $usercanedit) { $db->rollback(); setEventMessages($langs->trans("ErrorRemovingSecurityPolicy"), null, 'errors'); } - + header("Location: ".$_SERVER["PHP_SELF"].'?websiteid='.$websiteid."&action=editsecurity"); exit(); }