mirror of https://github.com/gorhill/uBlock.git
Fix potential spurious redirection in whitelisted tabless contexts
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1478
This commit is contained in:
parent
28b25f5e5a
commit
0390bb8b8a
|
@ -323,11 +323,16 @@ const onBeforeBehindTheSceneRequest = function(fctxt) {
|
|||
// use the origin URL as the scope. Most such requests aren't going to
|
||||
// be blocked, so we test for whitelisting and modify the result only
|
||||
// when the request is being blocked.
|
||||
//
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/1478
|
||||
// Also remove potential redirection when request is to be
|
||||
// whitelisted.
|
||||
if (
|
||||
result === 1 &&
|
||||
µb.getNetFilteringSwitch(fctxt.tabOrigin) === false
|
||||
) {
|
||||
result = 2;
|
||||
fctxt.redirectURL = undefined;
|
||||
fctxt.filter = { engine: 'u', result: 2, raw: 'whitelisted' };
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue