From 7e21eec7ce452728124c1a6001ffa62c09476302 Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 19 Oct 2017 00:45:24 -0400 Subject: [PATCH] code review for #3140: handle case where both blockedURI & sourceFile are not found --- src/js/traffic.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/js/traffic.js b/src/js/traffic.js index 961e0d3ff..e9eb32ebf 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -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' ||