-
Notifications
You must be signed in to change notification settings - Fork 639
Prototype.js registers an event handler in a way that triggers CSP errors #320
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
Comments
This block of code is a feature detection to determine if the browser has a problem setting and retrieving a function or array as the In the github master branch this block has been removed as it was mainly for older browsers. This should be resolved at next release. |
Awesome, that's great to hear! Thanks much! |
In prototype 1.7.3 (the current latest version), I changed lines 2776-2278 from: })();
if (PROBLEMATIC_ATTRIBUTE_READING) { to });
if (Prototype.Browser.IE && PROBLEMATIC_ATTRIBUTE_READING()) { as a workaround for this issue that doesn't also drop compatibility with old browsers which https://github.com/prototypejs/prototype/pull/307/files#diff-6fef80e8642914b14295c6c309ca4cff26e719fb7891045faa3ab5069a10f5e7 does (that's the change referenced in earlier comment #320 (comment) ) |
Avoid a CSP inline script violation. See: prototypejs/prototype#320
Avoid a CSP inline script violation. See: prototypejs/prototype#320
Avoid a CSP inline script violation. See: prototypejs/prototype#320
Avoid a CSP inline script violation. See: prototypejs/prototype#320
Avoid a CSP inline script violation. See: prototypejs/prototype#320
Avoid a CSP inline script violation. See: prototypejs/prototype#320
Avoid a CSP inline script violation. See: prototypejs/prototype#320
Avoid a CSP inline script violation. See: prototypejs/prototype#320
This particular bit of code:
Will trigger warnings in Firefox and Edge when
'unsafe-inline'
execution of JavaScript is blocked via CSP. This code could perhaps be removed entirely; alternatively, it could useaddEventListener()
, which does not cause the same CSP errors.See also:
https://bugzilla.mozilla.org/show_bug.cgi?id=1296027
https://bugs.chromium.org/p/chromium/issues/detail?id=638957
Thanks!
The text was updated successfully, but these errors were encountered: