Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit size of _redirects and _headers files #153

Closed
wants to merge 2 commits into from

Conversation

mac-chaffee
Copy link
Contributor

Updated version of #150 to applies to both when the files are written to minio and when they are read from minio.

This PR limits _redirects and _headers files to 5KB. If they are larger than 5KB, the user's site will return 500 errors.

I think this is a good idea since parsing these files is done on every request and parsing 25MB of regexes could cause a denial of service.

Copy link
Member

@neurosnap neurosnap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I just had one comment.

prose/config.go Outdated Show resolved Hide resolved
@neurosnap
Copy link
Member

Merged, thanks!

ec83e1d

@neurosnap neurosnap closed this Oct 18, 2024
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