Skip to content
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

Blank http-equiv causes CSP test to fail with 'csp-header-invalid' #492

Open
cuibonobo opened this issue Jan 25, 2023 · 0 comments
Open

Comments

@cuibonobo
Copy link

My site is currently returning the following CSP headers:

content-security-policy: default-src 'self'; script-src 'self'; object-src 'none'; frame-ancestors 'none'

However, the framework used to generate my site adds the following meta tag to the HTML header:

<meta http-equiv="content-security-policy" content="">

In this situation, equiv_csp_header ends up being a blank string and causes a CSP parsing error because the string is too short.

I plan on fixing the http-equiv for my site, but the observatory code should probably check if equiv_csp_header is a blank line before attempting to parse it.

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

No branches or pull requests

1 participant