Fix reporting of csp-blocked resources in logger

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/552#issuecomment-561888900

Regression from:
- https://github.com/gorhill/uBlock/commit/7971b223855d
This commit is contained in:
Raymond Hill 2019-12-04 19:23:57 -05:00
parent 953141f322
commit d90c8486aa
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -1489,7 +1489,7 @@ const logCSPViolations = function(pageStore, request) {
µb.staticNetFilteringEngine.matchAndFetchData(fctxt, 'csp'); µb.staticNetFilteringEngine.matchAndFetchData(fctxt, 'csp');
for ( const directive of staticDirectives ) { for ( const directive of staticDirectives ) {
if ( directive.result !== 1 ) { continue; } if ( directive.result !== 1 ) { continue; }
cspData.set(directive.data, directive.logData()); cspData.set(directive.getData('csp'), directive.logData());
} }
fctxt.type = 'inline-script'; fctxt.type = 'inline-script';