-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add worker-src to CSP #11040
Add worker-src to CSP #11040
Conversation
I have no idea how to review this :/ |
* @since 15.0.0 | ||
*/ | ||
public function disallowWorkerSrcDomain(string $domain) { | ||
$this->allowedWorkerSrcDomains[] = array_diff($this->allowedWorkerSrcDomains, [$domain]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem right.
$ php -a
Interactive shell
php > $arr = [1, 2, 3];
php > print_r($arr);
Array
(
[0] => 1
[1] => 2
[2] => 3
)
php > $arr[] = array_diff($arr, [2]);
php > print_r($arr);
Array
(
[0] => 1
[1] => 2
[2] => 3
[3] => Array
(
[0] => 1
[2] => 3
)
)
php >
But
php > $arr = [1, 2, 3];
php > $arr = array_diff($arr, [2]);
php > print_r($arr);
Array
(
[0] => 1
[2] => 3
)
php >
does 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woeps
Fixes #11035 Since the child-src directive is deprecated (we should kill it at some point) we need to have the proper worker-src available Signed-off-by: Roeland Jago Douma <[email protected]>
Signed-off-by: Roeland Jago Douma <[email protected]>
6ba3805
to
8354c50
Compare
@skjnldsv it is mostly following the code. The CSP is pretty straight forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good and kinda make sense 🐘
Fixes #11035