mirror of https://github.com/gorhill/uBlock.git
Fix regression in vAPI.warSecret guard code
Related commit: https://github.com/gorhill/uBlock/commit/bf591d93fb
This commit is contained in:
parent
74fa4f9e0e
commit
2a6c1d30b4
|
@ -1185,13 +1185,11 @@ vAPI.messaging = {
|
||||||
|
|
||||||
const guard = details => {
|
const guard = details => {
|
||||||
const match = reSecret.exec(details.url);
|
const match = reSecret.exec(details.url);
|
||||||
if ( match === null ) { return; }
|
if ( match === null ) { return { cancel: true }; }
|
||||||
const secret = match[1];
|
const secret = match[1];
|
||||||
if ( longSecrets.includes(secret) ) { return; }
|
if ( longSecrets.includes(secret) ) { return; }
|
||||||
const pos = shortSecrets.indexOf(secret);
|
const pos = shortSecrets.indexOf(secret);
|
||||||
if ( pos === -1 ) {
|
if ( pos === -1 ) { return { cancel: true }; }
|
||||||
return { cancel: true };
|
|
||||||
}
|
|
||||||
shortSecrets.splice(pos, 1);
|
shortSecrets.splice(pos, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue