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

Should gorilla/schema care about DoS attacks? #53

Closed
moraes opened this issue Oct 17, 2015 · 2 comments
Closed

Should gorilla/schema care about DoS attacks? #53

moraes opened this issue Oct 17, 2015 · 2 comments
Labels

Comments

@moraes
Copy link
Contributor

moraes commented Oct 17, 2015

I'll leave this IRC conversation as a quick request for feedback:

<pepee> honestly, this is still making me nervous:  http://www.gorillatoolkit.org/pkg/schema
<moraes> pepee, why?
<pepee> moraes, what if you pass a very long slice? or a long field in a form, etc.
<moraes> peppee, that's an interesting issue. probably not out of scope for the package.
<moraes> or for those kinds of attacks you shouldn't even touch request data
<moraes> pepee, so: 1. server check (413 status); 2. gorilla/schema could apply a limit tag
<pepee> moraes, yeah, there should be ways of limiting input, at least for the slices
<moraes> i will open an issue
<pepee> they should at least indicate that in the docs
<pepee> "make sure you sanitize your inputs, your user could be sending long strings, blah blah"
<moraes> yup.

The question is: Should gorilla/schema care about DoS attacks, at all? Or this is out of scope and should be handled in the server level or at most before submitting data to the package?

@elithrar
Copy link
Contributor

gorilla/schema could do that: but I'd argue that we'd be introducing another toggle that doubles up with net/http's ParseForm. That limits the request size to 10MB by default and MaxBytesReader provides the dial to tweak this. I'm not convinced that schema should take on that responsibility and/or potentially confuse package users (what if schema's limit is greater than the servers?)

There may be value in mentioning it in the docs, but we'd just be reiterating that the 10MB default limit exists.

@elithrar elithrar removed the question label Mar 20, 2017
@stale
Copy link

stale bot commented Dec 9, 2018

This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days.

@stale stale bot added the stale label Dec 9, 2018
@stale stale bot closed this as completed Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants