feat(api): remove size and rate limits from the bug report API

The API is consumed by curl/scripts that need to push full installation
logs, but field truncation (150k chars) and a 25-per-hour IP cap were
rejecting or silently cutting those payloads. Discord log chunks are now
streamed instead of being built in memory, so oversized logs no longer
blow up the notifier.
This commit is contained in:
BlackAngelTV committed 2026-10-02 20:59:11 +02:00
1 parent 2e3d7b6425
commit 5a52191599
3 files changed
+46 -49

No files matched your search

-13
View File
@@ -236,19 +236,6 @@ function fws_bugs_save_discord_info(PDO $pdo, int $id, string $threadId, string
$st->execute([':t' => $threadId, ':u' => $postUrl, ':id' => $id]);
}
/**
* Nombre de signalements pour une IP sur la dernière heure (anti-flood).
*/
function fws_bugs_count_recent_for_ip(PDO $pdo, string $ip): int
{
$st = $pdo->prepare(
"SELECT COUNT(*) FROM bug_reports
WHERE ip = :ip AND created_at > datetime('now', '-1 hour')"
);
$st->execute([':ip' => $ip]);
return (int) $st->fetchColumn();
}
/**
* IP réelle en tenant compte du proxy (X-Forwarded-For).
*/