Open baueric opened 1 year ago
I'm facing the same issue, @baueric were you able to resolve this?
@shivam-chahar a simple solution I used is taking the hash manually of intercom_script_tag
and adding it to my CSP.
@baueric Thanks, Eric. I'll try that out 🚀
Version info
Expected behavior
Both should be true depending on how you use
intercom-rails
:intercom_script_tag
: Theintercom_script_tag.csp_sha256
should match the hash of the script injected into the HTMLsha256
in the hook described in the CSP section of the readmedef self.csp_sha256_hook(controller, sha256)
should match the hash of the script injected into the HTMLActual behavior
The browser reports
There are
CDATA
tags surrounding the script resulting in the hash generated byintercom-rails
not matching the browser's hash of the script:I verified that if I take a manual sha256 hash with the CDATA tags included it does match the hash reported by the browser.
Steps to reproduce
intercom-rails
integrationconfig.content_security_policy_report_only = false
Logs