flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[api] Validate export date ranges before starting the response

Open K1NGD4VID opened this issue 1 month ago • 9 comments

Labels: api, backend, points: 150 File/location: backend/src/controllers/user.controller.ts:284

Description: startDate/endDate are converted with new Date but never checked for validity or ordering. Invalid text reaches BigInt(NaN) after the exporter has already started the response; reversed ranges silently yield empty exports.

Acceptance Criteria:

  • [ ] Reject invalid dates and startDate > endDate with a documented 400 response before writing export headers or rows.
  • [ ] Test missing bounds, valid ranges, malformed date text and reversed ranges for both csv and json.

Notes: Source trace: controller passes unchecked Invalid Date values; exporters convert getTime() to BigInt after writing the response prefix.

Audited commit: 649b6976a100fd964ce191428eef1faeb50aaa39. Closest prior issues reviewed: #1191. This report concerns the specific failure or uncovered test paths described above, rather than repeating the original feature request.

K1NGD4VID avatar Oct 21 '26 17:10 K1NGD4VID

@KingJiggy has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Hi maintainer kindly assign me this issue

ℹ️ Repo Maintainers: To accept this application, review their application or assign @KingJiggy to this issue.

KingJiggy avatar Oct 21 '26 21:10 KingJiggy

@OLAMIGHTY010 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

I would like to work on this issue

ℹ️ Repo Maintainers: To accept this application, review their application or assign @OLAMIGHTY010 to this issue.

OLAMIGHTY010 avatar Oct 21 '26 21:10 OLAMIGHTY010

@Favouratambi has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Hi! I've looked at the issue details and I love this kind of task. I'm confident I can handle it and deliver a well-tested PR on time. I'd be happy if you assign it to me

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Favouratambi to this issue.

Favouratambi avatar Oct 21 '26 21:10 Favouratambi

@Emmanuel-Ugochukwu1 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Hello maintainer please I’d love to work on this issue, I can deliver a mergeable PR in less than 48 hours

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Emmanuel-Ugochukwu1 to this issue.

Emmanuel-Ugochukwu1 avatar Oct 21 '26 21:10 Emmanuel-Ugochukwu1

@Mukhtar003 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Interested in working on this issue. I understand the requirements and can deliver a solution that meets the expected outcome.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Mukhtar003 to this issue.

Mukhtar003 avatar Oct 22 '26 06:10 Mukhtar003

@ojuotimi932 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Hi maintainer, can i resolve this kindly assign

ℹ️ Repo Maintainers: To accept this application, review their application or assign @ojuotimi932 to this issue.

ojuotimi932 avatar Oct 22 '26 07:10 ojuotimi932

Congratulations, @ojuotimi932! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

🧑‍💻 @ojuotimi932: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Oct 22 '26 07:10 drips-wave[bot]

🎉 This issue has been marked as completed on GrantFox!

@ojuotimi932's PR #1801 was approved and merged by @K1NGD4VID.

🏆 @ojuotimi932: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (726 total points). Track your full progress on GrantFox.

👏 Great work, @ojuotimi932! Keep contributing to LabsCrypt.

grantfox-oss[bot] avatar Oct 22 '26 08:10 grantfox-oss[bot]

This issue has been completed by @ojuotimi932 as part of the Stellar Wave Program's 10th Wave 🥳

😎 @ojuotimi932: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

drips-wave[bot] avatar Oct 22 '26 08:10 drips-wave[bot]