Don't fail in CSPGlobalCheck if CSP is invalid#68
Conversation
|
I'm wondering if we should issue a proper |
|
In my experience, most of the CSP policies are hardcoded so the dynamically built case is rather a corner case. I think it would be best to issue a finding for such situation - since a syntax error might cause the CSP to never be used. By leaving confidence low and maybe marking as "manual review", we can cover the corner cases. |
ed1f2c6 to
86fb1ed
Compare
|
I've changed the patch to issue a finding instead. |
|
LGTM! |
Just a quick fix: When the
CSPGlobalCheckencountered an invalid CSP, this resulted in an unhandled promise rejection. With this PR, the error is caught and execution can continue.Two examples of where different instances of this bug occurred:
https://github.com/deltachat/deltachat-desktop
https://github.com/MyCryptoHQ/MyCrypto