Skip to content

Ensure object-src: 'none' CSP directive is applied as intended - #6988

Open
Svetlitski wants to merge 1 commit into
google:mainfrom
janestreet:fix-object-src-csp-directive
Open

Ensure object-src: 'none' CSP directive is applied as intended#6988
Svetlitski wants to merge 1 commit into
google:mainfrom
janestreet:fix-object-src-csp-directive

Conversation

@Svetlitski

Copy link
Copy Markdown

According to MDN the single-quotes surrounding 'none' are mandatory in the object-src CSP directive. Unlike the other CSP directives that take care to preserve these single-quotes when required (e.g. 'self' in connect-src), the object-src was passing a plain none without quotes, which is treated as the bare hostname none.

[According to MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/object-src#none)
the single-quotes surrounding `'none'` are mandatory. Unlike the other CSP directives that take care to preserve these
single-quotes when required (e.g. `'self'` in `connect-src`), the `object-src` was passing a plain `none` without quotes,
which is treated as the bare hostname `none`.
@Svetlitski
Svetlitski requested a review from a team as a code owner August 4, 2026 14:46
@google-cla

google-cla Bot commented Aug 4, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@stevegolton stevegolton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

@stevegolton

Copy link
Copy Markdown
Member

@Svetlitski I think we just need you to sign the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants