Skip to content

fix(csp): encode @ in email addresses to prevent Cloudflare obfuscation CSP violation#445

Merged
mohanadft merged 1 commit into
mainfrom
fix/csp-email-obfuscation
May 3, 2026
Merged

fix(csp): encode @ in email addresses to prevent Cloudflare obfuscation CSP violation#445
mohanadft merged 1 commit into
mainfrom
fix/csp-email-obfuscation

Conversation

@mohanadft
Copy link
Copy Markdown
Collaborator

Summary

  • Cloudflare Scrape Shield detects plain @ in email addresses and injects email-decode.min.js to obfuscate them
  • That script loads from https://techforpalestine.org/cdn-cgi/scripts/... which is blocked by the CSP because strict-dynamic disables host-based allowlisting
  • Result: [email protected] shown to users instead of the real address

Fix

Replace @ with @ in donations@techforpalestine.org across all three donate pages (donate.astro, donate-2.astro, monthly-donate.astro). Browsers render the entity identically, but Cloudflare's scanner no longer detects an email address to obfuscate — so the decode script is never injected and the CSP violation disappears.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5dd9038
Status: ✅  Deploy successful!
Preview URL: https://41a2f200.website-aun.pages.dev
Branch Preview URL: https://fix-csp-email-obfuscation.website-aun.pages.dev

View logs

@mohanadft mohanadft merged commit ce32037 into main May 3, 2026
5 checks passed
@mohanadft mohanadft deleted the fix/csp-email-obfuscation branch May 3, 2026 08:25
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.

1 participant