1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-06 19:02:30 +01:00

code review for #3140: handle case where both blockedURI & sourceFile are not found

This commit is contained in:
gorhill 2017-10-19 00:45:24 -04:00
parent 392fef1828
commit 7e21eec7ce
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -440,6 +440,8 @@ var onBeforeMaybeSpuriousCSPReport = function(details) {
sourceFile = report['source-file'] ||
report['sourceFile'];
if (
(typeof blockedURI === 'string' ||
typeof sourceFile === 'string') &&
(typeof blockedURI !== 'string' ||
blockedURI.startsWith('data') === false) &&
(typeof sourceFile !== 'string' ||