40 $head[$h][0] = DOL_URL_ROOT.
'/website/index.php?websiteid='.
$object->id.
'&action=editcss';
41 $head[$h][1] = $langs->trans(
"General");
42 $head[$h][2] =
'general';
45 $head[$h][0] = DOL_URL_ROOT.
'/website/index.php?websiteid='.
$object->id.
'&action=editsecurity';
46 $head[$h][1] = $langs->trans(
"Security");
47 $head[$h][2] =
'security';
103 "child-src" => array(
"label" =>
"child-src",
"data-directivetype" =>
"fetch"),
104 "connect-src" => array(
"label" =>
"connect-src",
"data-directivetype" =>
"fetch"),
105 "default-src" => array(
"label" =>
"default-src",
"data-directivetype" =>
"fetch"),
106 "fenced-frame-src" => array(
"label" =>
"fenced-frame-src",
"data-directivetype" =>
"fetch"),
107 "font-src" => array(
"label" =>
"font-src",
"data-directivetype" =>
"fetch"),
108 "frame-src" => array(
"label" =>
"frame-src",
"data-directivetype" =>
"fetch"),
109 "img-src" => array(
"label" =>
"img-src",
"data-directivetype" =>
"fetch"),
110 "manifest-src" => array(
"label" =>
"manifest-src",
"data-directivetype" =>
"fetch"),
111 "media-src" => array(
"label" =>
"media-src",
"data-directivetype" =>
"fetch"),
112 "object-src" => array(
"label" =>
"object-src",
"data-directivetype" =>
"fetch"),
113 "prefetch-src" => array(
"label" =>
"prefetch-src",
"data-directivetype" =>
"fetch"),
114 "script-src" => array(
"label" =>
"script-src",
"data-directivetype" =>
"fetch"),
115 "script-src-elem" => array(
"label" =>
"script-src-elem",
"data-directivetype" =>
"fetch"),
116 "script-src-attr" => array(
"label" =>
"script-src-attr",
"data-directivetype" =>
"fetch"),
117 "style-src" => array(
"label" =>
"style-src",
"data-directivetype" =>
"fetch"),
118 "style-src-elem" => array(
"label" =>
"style-src-elem",
"data-directivetype" =>
"fetch"),
119 "style-src-attr" => array(
"label" =>
"style-src-attr",
"data-directivetype" =>
"fetch"),
120 "worker-src" => array(
"label" =>
"worker-src",
"data-directivetype" =>
"fetch"),
122 "base-uri" => array(
"label" =>
"base-uri",
"data-directivetype" =>
"document"),
123 "sandbox" => array(
"label" =>
"sandbox",
"data-directivetype" =>
"document"),
125 "form-action" => array(
"label" =>
"form-action",
"data-directivetype" =>
"navigation"),
126 "frame-ancestors" => array(
"label" =>
"frame-ancestors",
"data-directivetype" =>
"navigation"),
128 "report-to" => array(
"label" =>
"report-to",
"data-directivetype" =>
"reporting"),
130 "require-trusted-types-for" => array(
"label" =>
"require-trusted-types-for",
"data-directivetype" =>
"require-trusted-types-for"),
131 "trusted-types" => array(
"label" =>
"trusted-types",
"data-directivetype" =>
"trusted-types"),
132 "upgrade-insecure-requests" => array(
"label" =>
"upgrade-insecure-requests",
"data-directivetype" =>
"none"),
146 "*" => array(
"label" =>
"*",
"data-sourcetype" =>
"select"),
147 "data" => array(
"label" =>
"data:",
"data-sourcetype" =>
"data"),
148 "self" => array(
"label" =>
"self",
"data-sourcetype" =>
"quoted"),
149 "unsafe-eval" => array(
"label" =>
"unsafe-eval",
"data-sourcetype" =>
"quoted"),
150 "wasm-unsafe-eval" => array(
"label" =>
"wasm-unsafe-eval",
"data-sourcetype" =>
"quoted"),
151 "unsafe-inline" => array(
"label" =>
"unsafe-inline",
"data-sourcetype" =>
"quoted"),
152 "unsafe-hashes" => array(
"label" =>
"unsafe-hashes",
"data-sourcetype" =>
"quoted"),
153 "inline-speculation-rules" => array(
"label" =>
"inline-speculation-rules",
"data-sourcetype" =>
"quoted"),
154 "strict-dynamic" => array(
"label" =>
"strict-dynamic",
"data-sourcetype" =>
"quoted"),
155 "report-sample" => array(
"label" =>
"report-sample",
"data-sourcetype" =>
"quoted"),
156 "host-source" => array(
"label" =>
"host-source (*.mydomain.com)",
"data-sourcetype" =>
"input"),
157 "scheme-source" => array(
"label" =>
"scheme-source",
"data-sourcetype" =>
"input"),
161 "none" => array(
"label" =>
"self",
"data-sourcetype" =>
"quoted"),
162 "self" => array(
"label" =>
"self",
"data-sourcetype" =>
"quoted"),
163 "host-source" => array(
"label" =>
"host-source (*.mydomain.com)",
"data-sourcetype" =>
"input"),
164 "scheme-source" => array(
"label" =>
"scheme-source (*.mydomain.com)",
"data-sourcetype" =>
"input"),
167 "navigation" => array(
168 "none" => array(
"label" =>
"self",
"data-sourcetype" =>
"quoted"),
169 "self" => array(
"label" =>
"self",
"data-sourcetype" =>
"quoted"),
170 "host-source" => array(
"label" =>
"host-source (*.mydomain.com)",
"data-sourcetype" =>
"input"),
171 "scheme-source" => array(
"label" =>
"scheme-source",
"data-sourcetype" =>
"input"),
174 "reporting" => array(
175 "report-to" => array(
"label" =>
"report-to",
"data-sourcetype" =>
"input"),
178 "require-trusted-types-for" => array(
179 "script" => array(
"label" =>
"script",
"data-sourcetype" =>
"select"),
181 "trusted-types" => array(
182 "policyName" => array(
"label" =>
"policyName",
"data-sourcetype" =>
"input"),
183 "none" => array(
"label" =>
"none",
"data-sourcetype" =>
"quoted"),
184 "allow-duplicates" => array(
"label" =>
"allow-duplicates",
"data-sourcetype" =>
"quoted"),
197 $forceCSPArr = array();
199 $sourceCSPArrflatten = array();
202 foreach ($sourceCSPArr as $key => $arr) {
203 $sourceCSPArrflatten = array_merge($sourceCSPArrflatten, array_keys($arr));
206 $forceCSP = preg_replace(
'/;base64,/',
"__semicolumnbase64__", $forceCSP);
207 $securitypolicies = explode(
";", $forceCSP);
210 foreach ($securitypolicies as $key => $securitypolicy) {
211 if ($securitypolicy ==
"") {
214 $securitypolicy = preg_replace(
'/__semicolumnbase64__/',
";base64,", $securitypolicy);
215 $securitypolicyarr = explode(
" ", $securitypolicy);
216 $directive = array_shift($securitypolicyarr);
218 while ($directive ==
"") {
219 $directive = array_shift($securitypolicyarr);
221 if (empty($directive)) {
224 $sources = $securitypolicyarr;
225 if (empty($sources)) {
226 $forceCSPArr[$directive] = array();
229 foreach ($sources as $key2 => $source) {
230 $source = str_replace(
"'",
"", $source);
231 if (empty($source)) {
234 if (empty($forceCSPArr[$directive])) {
235 $forceCSPArr[$directive] = array($source);
237 $forceCSPArr[$directive][] = $source;
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
websiteGetContentPolicyDirectives()
Prepare array of directives for Website.
websiteGetContentPolicySources()
Prepare array of sources for Website.
websiteGetContentPolicyToArray($forceCSP)
Transform a Content Security Policy to an array.
websiteconfigPrepareHead($object)
Prepare array of tabs for Website.