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

Add FormData validation at the add_field method. #334

Merged
merged 3 commits into from
Apr 24, 2015

Conversation

ttezel
Copy link

@ttezel ttezel commented Apr 19, 2015

Prevent errors being raised further down the stack by ensuring content_type, content_transfer_encoding and filename are instances of str in add_field. Technically filename can be a bytes instance, but I think for sanity we probably just want to ensure that it is a str as well.

@asvetlov
Copy link
Member

The PR is looks good, but please rewrite test.
I prefer three separate tests for each raised exception.
Also tests should directly forbid bytes parameter like b'data'

@asvetlov
Copy link
Member

Also, please, add yourself to CONTRIBUTORS.txt :)

@asvetlov asvetlov merged commit b337c42 into aio-libs:master Apr 24, 2015
@asvetlov
Copy link
Member

Merged. Thanks!

@lock
Copy link

lock bot commented Oct 30, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants