Repository navigation
fix(api): refuse invalid dates and years on read endpoints - #236
Merged
Merged
Conversation
The request list passed `from` and `to` to the database as they came, and the balance, team balance, employees list, entitlement, pro rata, report and balance export endpoints took any `year`. An invalid value reached the queries and the date arithmetic unchecked. The request list now checks both dates like a request's own dates, and the year endpoints accept 2000 to 2100 only, with the check the entitlement API already uses. Anything else is a 422 with a message. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
skjnldsv
force-pushed
the
fix/validate-read-params
branch
from
November 17, 2026 15:20
d426549 to
d706cfc
Compare
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.
Thirteen read routes passed
from,tooryearthrough unchecked, so an invalid value reached the database. They now answer 422 with a message, using the app's existing date and year checks. The access matrix covers all 19 combinations.👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.