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
1 changed files with 2 additions and 0 deletions

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' ||