mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch 'new-website-security-const' of github.com:Hystepik/dolibarr into new-website-security-const
This commit is contained in:
commit
cbf8d6ae01
|
|
@ -2978,6 +2978,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;
|
||||
|
|
@ -2992,7 +2994,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"];
|
||||
}
|
||||
|
|
@ -3048,6 +3050,7 @@ if ($action == 'removecspsource' && $usercanedit) {
|
|||
$db->rollback();
|
||||
setEventMessages($langs->trans("ErrorRemovingSecurityPolicy"), null, 'errors');
|
||||
}
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"].'?websiteid='.$websiteid."&action=editsecurity");
|
||||
exit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user