Skip to content

Fix 500 on feeds for end_date=9999-12-31 and large max_age. Closes #1787 - #1808

Merged
regulartim merged 1 commit into
GreedyBear-Project:developfrom
Saurabh-1785:fix/feeds-date-overflow-1787
Nov 3, 2026
Merged

regulartim merged 1 commit into
GreedyBear-Project:developfrom
Saurabh-1785:fix/feeds-date-overflow-1787

Conversation

@Saurabh-1785

Copy link
Copy Markdown
Contributor

Description

Two values made the advanced and ASN feeds return 500 instead of 400:

Share links go through the same serializer, so a link with a too large max_age is rejected when it is created, and a link with end_date=9999-12-31 works again. Links created before this change with a too large max_age now return 400 instead of 500 when consumed.

I added tests for both values on the advanced feed, the ASN feed and share links. They fail on develop and pass with this change.

Related issues

Closes #1787
Related: #1672, #1678, #1647

Type of change

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Chore (refactoring, dependency updates, CI/CD changes, code cleanup, docs-only changes).

Checklist

Formalities

  • I have read and understood the rules about how to Contribute to this project.
  • I chose an appropriate title for the pull request in the form: <feature name>. Closes #999
  • My branch is based on develop.
  • The pull request is for the branch develop.
  • I have reviewed and verified any LLM-generated code included in this PR.

Docs and tests

  • I documented my code changes with docstrings and/or comments.
  • I have checked if my changes affect user-facing behavior that is described in the docs. If so, I also included an update to the wiki in the description of this PR.
  • Linter (Ruff) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.
  • I have added tests for the feature/bug I solved.
  • All the tests gave 0 errors.

…eedyBear-Project#1787

end_date=9999-12-31 overflowed when the filter added a day to it, so it
is now treated as no upper bound. max_age gets an upper limit of 36500
days, so values reaching back before year 1 return 400 instead of 500.
Copilot AI balanced review requested due to automatic review settings October 29, 2026 11:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Saurabh-1785

Copy link
Copy Markdown
Contributor Author

@regulartim i have fixed issue #1787. You can verify it.

@regulartim regulartim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Saurabh-1785 ! Small, correct fix. Thanks a lot! 👍

@regulartim
regulartim merged commit d605360 into GreedyBear-Project:develop Nov 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants