-
Notifications
You must be signed in to change notification settings - Fork 35
Add an optional max_size parameter to serialize to prevent certain attacks where size can blow up
#173
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
Conversation
Pull Request Test Coverage Report for Build 15819603206Details
💛 - Coveralls |
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
|
An issue I can think of is that it makes life difficult for |
|
And here's an alternate mechanism for implementation, where you just put a wrapper around the file-like object Providing a wrapper like this could make it more opt-in. |
|
Or maybe just a new API with a new name which requires the Conceptually it's fine. But I just worry about me getting dinged when trying to use |
|
I think changing the default to have a limit is an important feature |
|
I think the current implementation is preferable implementing the limit in a stream adapter. We don't know of any use cases where it's OK to be unsafe (i.e. unlimited). even The implementation is also simple to follow and in the place where you would first look, so easy for other people to have confidence in being correct. |
Adds an optional field to quit out of serializing if a maximum byte count is reached
This change also takes the time to update a couple of out of date things.
py.testis deprecated in favour ofpytestandmypyis now catching a problem in more_ops.py