tiangolo/fastapi

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

Sube-py opened this issue · 4 comments

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

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.

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

file which name contains non-ascii can not upload

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. ☕