Repository navigation
Fix 500 on feeds for end_date=9999-12-31 and large max_age. Closes #1787 - #1808
Merged
regulartim merged 1 commit intoNov 3, 2026
Conversation
…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.
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
|
@regulartim i have fixed issue #1787. You can verify it. |
regulartim
approved these changes
Nov 3, 2026
regulartim
left a comment
Member
There was a problem hiding this comment.
Hey @Saurabh-1785 ! Small, correct fix. Thanks a lot! 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two values made the advanced and ASN feeds return 500 instead of 400:
end_date=9999-12-31: since Include the full end day in feeds end_date filter. #1678 the filter adds one day toend_date, which overflows for the last possible date. That date is now treated as no upper bound, which is what it returned before Include the full end day in feeds end_date filter. #1678. Every otherend_datestill uses thelast_seen__ltlookup from Include the full end day in feeds end_date filter. #1678.max_ageof about 740000 or more:timezone.now() - timedelta(days=max_age)went past year 1.max_agenow hasmax_value=36500, so these requests return 400.Share links go through the same serializer, so a link with a too large
max_ageis rejected when it is created, and a link withend_date=9999-12-31works again. Links created before this change with a too largemax_agenow 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
developand pass with this change.Related issues
Closes #1787
Related: #1672, #1678, #1647
Type of change
Checklist
Formalities
<feature name>. Closes #999develop.develop.Docs and tests
Ruff) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.