Skip to content

Mechanism to limit the JSON length as input to APIs#6578

Merged
labkey-jeckels merged 1 commit intodevelopfrom
fb_jsonLimit
Apr 17, 2025
Merged

Mechanism to limit the JSON length as input to APIs#6578
labkey-jeckels merged 1 commit intodevelopfrom
fb_jsonLimit

Conversation

@labkey-jeckels
Copy link
Copy Markdown
Contributor

Rationale

Accepting massive JSON inputs can be bad for server health.

Changes

  • New annotation option for limiting the maximum length of JSON


/**
* Restricts the Reader to a character limit. Throws an exception when the limit is exceeded.
* Similar to Apache's BoundedReader, which silently truncates.
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.

Too bad about BoundedReader

@labkey-jeckels labkey-jeckels marked this pull request as ready for review April 17, 2025 18:58
@labkey-jeckels labkey-jeckels merged commit 1096d02 into develop Apr 17, 2025
20 checks passed
@labkey-jeckels labkey-jeckels deleted the fb_jsonLimit branch April 17, 2025 21:03
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