[BUG] Weekly AI summary quota race and unbounded request body
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- next.js, supabase, typescript
Direzione di ricerca
Start at the /api/ai/weekly-summary route and trace how it checks the 24-hour limit, parses JSON, generates the summary, and persists the timestamp. The report identifies a race and missing body-size limit; a linked open pull request (#4055) is already addressing the issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened?
Code review found two defects in the weekly AI summary API. First, its 24-hour limit was checked separately from model generation and persistence, allowing simultaneous requests for one user to trigger duplicate paid provider calls. Second, the route parsed request JSON without a body-size limit, so oversized inputs could consume excessive memory before validation.
Expected behavior is to atomically claim a user's generation window and bound request parsing before quota or provider work. These defects were identified in source review; they were not reproduced against the live deployment.
Steps to reproduce
- On a revision before the fix, send concurrent authenticated POST requests to
/api/ai/weekly-summaryfor the same user; each can pass the timestamp read before any request writes it. - Send a valid JSON request body larger than 8 KiB; the route parses it without an input cap.
- Observe concurrent model calls or unbounded body parsing.
Where is it?
API
Where did you see it?
Local development (code review; not reproduced against the live deployment)
Want to fix it?
- I'd like to work on this. A maintainer will assign you; please don't start before that.
- Lingua principale
- TypeScript
- Stelle
- 246
- Fork
- 436
- Merge medio
- 9h 33m
- PR unite (30g)
- 213
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Priyanshu-byte-coder/devtrack
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Priyanshu-byte-coder/devtrack#4067 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Priyanshu-byte-coder/devtrack#4066 ·
I maintainer di solito rispondono entro 1 giorno
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModalForse già presa @Nandaninaulaa l’ha presa 4 giorni fa. Apertagood first issue level 1 level:beginner status:assigned type:design
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
Priyanshu-byte-coder/devtrack#3889 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Goals form: square arcade buttons for recurrence, Create goal and RefreshForse già presa @KartikeyG-world l’ha presa 4 giorni fa. Apertagood first issue level 1 level:beginner status:assigned type:design
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
Priyanshu-byte-coder/devtrack#3877 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Goals: the error banner and the "No goals yet" hint show at the same timeForse già presa @KartikeyG-world l’ha presa 4 giorni fa. Apertagood first issue level 1 level:beginner status:assigned type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
Priyanshu-byte-coder/devtrack#3872 · 6 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Priyanshu-byte-coder/devtrack
Issue simili
-
提出物確認の詳細で状態バッジの重複と期限切れの欠落を直すApertaCodex使用可 かんたん コード
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ryuki-moro/Nicomaru#348 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
area-integrations
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno