Fix: suppression du timing check (faux positifs sur desktop)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
67d8159787
commit
9f8854efa5
2 changed files with 3 additions and 14 deletions
|
|
@ -24,12 +24,6 @@ return [
|
|||
wpReject(400, 'Bad request');
|
||||
}
|
||||
|
||||
// ── Timing check (min 3 s) ────────────────────────────────
|
||||
$openedAt = isset($body['_t']) ? (int)$body['_t'] : 0;
|
||||
if ($openedAt === 0 || (time() * 1000 - $openedAt) < 3000) {
|
||||
wpReject(400, 'Too fast');
|
||||
}
|
||||
|
||||
// ── Rate limiting (5 req / hour / IP) ─────────────────────
|
||||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR'] ?? 'unknown';
|
||||
$cacheKey = 'wp-dl-' . md5($ip);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue