mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-06 19:02:30 +01:00
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
|
// 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
|
// be blocked, so we test for whitelisting and modify the result only
|
||||||
// when the request is being blocked.
|
// 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 (
|
if (
|
||||||
result === 1 &&
|
result === 1 &&
|
||||||
µb.getNetFilteringSwitch(fctxt.tabOrigin) === false
|
µb.getNetFilteringSwitch(fctxt.tabOrigin) === false
|
||||||
) {
|
) {
|
||||||
result = 2;
|
result = 2;
|
||||||
|
fctxt.redirectURL = undefined;
|
||||||
fctxt.filter = { engine: 'u', result: 2, raw: 'whitelisted' };
|
fctxt.filter = { engine: 'u', result: 2, raw: 'whitelisted' };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user