mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-22 18:32:45 +01:00
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 match = reSecret.exec(details.url);
|
||||
if ( match === null ) { return; }
|
||||
if ( match === null ) { return { cancel: true }; }
|
||||
const secret = match[1];
|
||||
if ( longSecrets.includes(secret) ) { return; }
|
||||
const pos = shortSecrets.indexOf(secret);
|
||||
if ( pos === -1 ) {
|
||||
return { cancel: true };
|
||||
}
|
||||
if ( pos === -1 ) { return { cancel: true }; }
|
||||
shortSecrets.splice(pos, 1);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user