Skip to content

Limit max size of the URL - #211

Merged
umputun merged 3 commits into
masterfrom
max-request-url
Nov 26, 2024
Merged

umputun merged 3 commits into
masterfrom
max-request-url

Conversation

@umputun

@umputun umputun commented Nov 26, 2024

Copy link
Copy Markdown
Owner

I have seen a case where the GET parameter was insanely large. The current implementation of the maxReqSizeHandler does not check the URL's length (with all the arguments). This PR addresses this issue.

Note: it doesn't check the cumulative size of the request body and URL but rather applies the maximum limit to each one separately.

At the same time, Go was bumped to 1.23 and dependencies updated.

as go loads the request to memory, it is necessary to prevent huge urls to hit is hard. Checking RawQuery len to the same maxSize in practice may allow double-sized requests max, but will do for now
@umputun
umputun merged commit ad84e95 into master Nov 26, 2024
@umputun
umputun deleted the max-request-url branch November 26, 2024 22:22
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.

1 participant