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

content disposition with semicolon in filename #917

Closed
tumb1er opened this issue Jun 7, 2016 · 12 comments
Closed

content disposition with semicolon in filename #917

tumb1er opened this issue Jun 7, 2016 · 12 comments
Labels
Milestone

Comments

@tumb1er
Copy link
Contributor

tumb1er commented Jun 7, 2016

aiohttp multipart parser raises BadContentDispositionHeader if filename contains semicolon.
Expected filename being parsed correctly because it's quoted string.

Actually:

>>> from aiohttp.multipart import parse_content_disposition
>>> print(parse_content_disposition('form-data; name="data"; filename="file ; name.mp4"'))
aiohttp/multipart.py:123: BadContentDispositionHeader: form-data; name="data"; filename="file ; name.mp4"
  warnings.warn(BadContentDispositionHeader(header))
(None, {})

aiohttp==0.21.6
python3.4

@tumb1er
Copy link
Contributor Author

tumb1er commented Jun 7, 2016

cgi.parse_header parses it correctly, with russian characters support.

@lukasz-madon
Copy link
Contributor

aiohttp doesn't implement specification properly. See my comment for more info #916

@kxepal
Copy link
Member

kxepal commented Sep 16, 2016

Yes, that's a known bug.

@fafhrd91
Copy link
Member

fafhrd91 commented Feb 7, 2017

@kxepal can we do something quickly with this issue?

@kxepal
Copy link
Member

kxepal commented Feb 7, 2017

@fafhrd91 Will take a second look on these days.

@fafhrd91
Copy link
Member

fafhrd91 commented Feb 7, 2017

thanks!

@fafhrd91 fafhrd91 added this to the 2.0 milestone Feb 16, 2017
@fafhrd91
Copy link
Member

@kxepal could you handle this before 2.0 (1 week)

@kxepal
Copy link
Member

kxepal commented Feb 17, 2017

Yes, I have a prototype of fix, need to polish, check and throw in.

@fafhrd91
Copy link
Member

@kxepal I need you to push some fix

@fafhrd91
Copy link
Member

@kxepal could you fix this

@fafhrd91 fafhrd91 modified the milestones: 2.1, 2.0 Mar 15, 2017
@fafhrd91
Copy link
Member

this is partial fix, to properly fix this issue we need new parser

@lock
Copy link

lock bot commented Oct 28, 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 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants