AdguardTeam / AdguardTeam/Scriptlets

Improve 'prevent-fetch' — allow adding arbitrary delay before returning response

未关闭
#526 6 条评论 0 个 reaction 已指派 1 人 已被 @maximtop 认领 在 GitHub 查看
enhancement Priority: P4
主要语言
JavaScript
星标
195
派生
33
PR 合并指标
30 天内没有已合并 PR

描述

A few sites started to exploit `performance.now` to see the timing difference with real ad requests. First spotted by @stephenhawk8054
on `https://kio.ac/c/ashM-l6lE_IvX2v9QxR5Gb` with following code
```
const i = e.now();
const s = await fetch(M(0), {
cache: M(4),
mode: M(3)
});
if (e.now() - i < 50) {
t(true);
return;
}
```

and now `pvpoke-re.com` too (skipping pasting the code as it's heavily obfuscated and long). uBO has addressed this by https://github.com/gorhill/uBlock/commit/d2bce26e7d537f156b6a5484efbba2ea0bbff24c

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。