Skip to content

Fix: add validation for size/offset parameters for various endpoints#1892

Merged
netomi merged 3 commits into
mainfrom
malowe/private/tob-38
Jun 4, 2026
Merged

Fix: add validation for size/offset parameters for various endpoints#1892
netomi merged 3 commits into
mainfrom
malowe/private/tob-38

Conversation

@netomi
Copy link
Copy Markdown
Contributor

@netomi netomi commented Jun 4, 2026

Created by @autumnfound

There are various endpoints that take a size / offset parameter as input. So far these values were not validated for lower / upper bounds. This PR adds validation in the form:

  • size: must not be negative
  • offset: must not be negative

additionally, for size there is an upper bound check for the following endpoints:

  • search: 1000
  • query: 1000
  • query v2: 1000
  • extension versions: 100
  • extension version-refs: 100

admin endpoints have also been updated with the same validations and with an upper bound of 100.

The reason search / query endpoints have a higher upper bound is because various users use such a value right now and we do not want to break their workflows. 1000 is a reasonable limit but it might be reduced in the future.

@netomi netomi merged commit 733e462 into main Jun 4, 2026
4 checks passed
@netomi netomi deleted the malowe/private/tob-38 branch June 4, 2026 12:56
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.

2 participants