You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] No limit on future streak freeze creation users can stockpile unlimited freezes #1476
This issue is raised as part of GSSoC'26. Kindly consider assigning it to me.
Summary
In src/app/api/streak/freeze/route.ts, the POST handler only checks
for a duplicate freeze on today's date specifically:
.eq("freeze_date", today)
There is no check for how many total pending freezes a user already
holds. A user can call POST /api/streak/freeze with future dates
repeatedly and stockpile an unlimited number of unused freezes,
completely bypassing the intended one-freeze limit.
Steps to Reproduce
Call POST /api/streak/freeze for today
Modify the request to use tomorrow's date
Repeat for future dates
Observe unlimited freezes accumulate with no restriction
Expected Behavior
Users should be limited to a maximum number of unused freezes
at any time (e.g. 1 or a configurable max).
Actual Behavior
No upper limit exists. Users can stockpile unlimited pending
freezes by targeting future dates.
Fix
Add a count check before allowing new freeze creation:
Closing — already implemented on main. The freeze endpoint guards against stockpiling — src/app/api/streak/freeze/route.ts counts existing unused freezes and rejects extras (it's also timezone-correct now).
Part of a tracker cleanup pass. Comment if you think a specific part is still missing and I'll reopen.
Activity
Midoriya-w commentedon May 29, 2026
Hey @Priyanshu-byte-coder I discovered this bug while auditing the codebase and would love to fix it under GSSoC 2026. Can I get assigned?
Midoriya-w commentedon May 29, 2026
Hey @Priyanshu-byte-coder,
I've implemented the fix and opened a PR for review: #1540
Changes made:
Ready for review. Thanks.
rudrakshtank commentedon Jun 19, 2026
Hi mentor I am a Gssoc contributor please can you assign me this issue so I can work on it.
github-actions commentedon Jun 19, 2026
@rudrakshtank This issue is already taken by @Midoriya-w. Check other open issues!
Priyanshu-byte-coder commentedon Jul 29, 2026
Closing — already implemented on
main. The freeze endpoint guards against stockpiling —src/app/api/streak/freeze/route.tscounts existing unused freezes and rejects extras (it's also timezone-correct now).Part of a tracker cleanup pass. Comment if you think a specific part is still missing and I'll reopen.
github-actions commentedon Jul 29, 2026
✅ Closed as completed!
If DevTrack has been useful, a ⭐ star on the repo helps the project grow and reach more developers.