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

Investigate workaround for security rules #199

Open
sheabunge opened this issue Dec 6, 2024 · 1 comment
Open

Investigate workaround for security rules #199

sheabunge opened this issue Dec 6, 2024 · 1 comment
Labels

Comments

@sheabunge
Copy link
Member

sheabunge commented Dec 6, 2024

Current behavior

It seems that a multitude of security software, including CloudFlare, Apache mod_sec, and nginx firewall rules, will sometimes see snippet code being transmitted over HTTP and flag it as a false positive, causing bizarre HTTP errors.

Expected behavior

We should see if we can find alternate methods of transmitting snippet data to avoid these false-positives. Perhaps web encoding?

Steps to reproduce

  1. Set-up some form of incompatible security software.
  2. Create or edit a snippet containing HTML code.
  3. HTTP request should fail.

WordPress version

6.7.1

Code Snippets version

3.6.6.1

Code Snippets license

Core (free), Pro

Anything else?

Related support threads:

@sheabunge sheabunge added the bug label Dec 6, 2024
@sheabunge
Copy link
Member Author

Possible solution for CloudFlare provided by Generosus:

We confirmed the above is causing the issue. That is, code snippets that contain “echo” are being blocked by Cloudflare under the service “Managed rules (previous version).

Details

So, based on the above, we created a Cloudflare WAF Rule to skip any code snippet that triggers Cloudflare’s “Managed rules (previous version” service.

Details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant