Skip to content

[api] Validate export date ranges before starting the response #1707

Closed

Description

@K1NGD4VID

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.

Activity

  1. KingJiggy commented on Oct 21, 2026

    @KingJiggy

    @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.

  2. OLAMIGHTY010 commented on Oct 21, 2026

    @OLAMIGHTY010
    Contributor

    @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.

  3. Favouratambi commented on Oct 21, 2026

    @Favouratambi

    @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.

  4. Emmanuel-Ugochukwu1 commented on Oct 21, 2026

    @Emmanuel-Ugochukwu1

    @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.

  5. Mukhtar003 commented on Oct 22, 2026

    @Mukhtar003

    @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.

  6. ojuotimi932 commented on Oct 22, 2026

    @ojuotimi932

    @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.

  7. drips-wave commented on Oct 22, 2026

    @drips-wave

    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 🌊

  8. grantfox-oss commented on Oct 22, 2026

    @grantfox-oss

    🎉 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.

  9. drips-wave commented on Oct 22, 2026

    @drips-wave

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions