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

[BUG] Upgrade python-mulipart==0.0.7 from low version fastapi upload file may be 400 #11104

Closed
1 task done
Sube-py opened this issue Feb 7, 2024 · 4 comments
Closed
1 task done

Comments

@Sube-py
Copy link

Sube-py commented Feb 7, 2024

Privileged issue

  • I'm @tiangolo or he asked me directly to create an issue here.

Issue Content

In order to fix the security issue of uploaded files, we upgraded the python-mulipart library, but this caused "There was an error parsing the body" to appear frequently when uploading files.
image

  • macos: 14.2.1
  • fastapi: 0.94.1
  • python-multipart: 0.0.7
@Sube-py
Copy link
Author

Sube-py commented Feb 7, 2024

Due to the major changes in the version after 0.94.1, we were unable to upgrade our project in a short period of time, but we also wanted to avoid upload vulnerabilities. After upgrading python-mulitpart, the security problem was indeed solved, but we could not upload it.

@Sube-py
Copy link
Author

Sube-py commented Feb 7, 2024

[BUG2] The latest fastapi version can not upload the file which name contains Chinese.

@h0rn3t
Copy link

h0rn3t commented Feb 9, 2024

file which name contains non-ascii can not upload

@tiangolo
Copy link
Member

tiangolo commented Feb 9, 2024

Thanks for the interest! The best place to start these conversations is in GitHub Discussions. New issues should be created by me, or someone I asked directly.

GitHub Discussions have a specific template that guides the conversation in a way that allows us to figure out what needs to happen, what is currently happening, etc. Including a replicable example and others.


This specific error is related to python-multipart, it's reported here: Kludex/python-multipart#78, introduced by me here: Kludex/python-multipart#75, and fixed here: Kludex/python-multipart#79 (review)


Given that, I'll now close this one. ☕

@tiangolo tiangolo closed this as completed Feb 9, 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

No branches or pull requests

3 participants