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

Random Checkbox Appears with CSP added to webpage #70

Open
JoshuaPettus opened this issue Aug 5, 2022 · 1 comment
Open

Random Checkbox Appears with CSP added to webpage #70

JoshuaPettus opened this issue Aug 5, 2022 · 1 comment

Comments

@JoshuaPettus
Copy link

Here is a random one I was wondering if someone could shine some light on what's going on. In the interest of security and getting an A+ in Mozilla's Observatory, I added a basic CSP header to my picocms webpage. Thing is, when I do this, a random checkbox is added to the bottom of my form above the send button. This checkbox has no text or anything. When it's checked it stops the form from going through. My first thought was that somehow the honeypot that was showing so I turned it off, but it's still there.
Clearly it's something wrong with my implementation that's effecting the p01contact plugin. I'm using Nginx and PHP8.1
Here is the header I added:

add_header Content-Security-Policy "default-src 'none'; script-src 'self; connect-src 'self'; img-src 'self'; style-src 'self'; base-uri 'self; form-action 'self'; frame-src https://SiteINeedanIframeFrom.com; frame-ancestors 'none'" always;

Any Ideas?

@JoshuaPettus
Copy link
Author

It turns out it was indeed the honeypot being forced visible with the Content-Security-Policy, even if it's marked disabled in the config. As I already had a capcha field in place, I just opted to comment out the code in the plugin that displayed the honeypot.

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