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

fix: cgi.FieldStorage not available in Python 3.13 #1438

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Nov 4, 2023

  1. fix: cgi.FieldStorage not available in Python 3.13

    cgi.FieldStorage (used for multipart parsing) was deprecated
    in Python 3.11 and removed in 3.13. We now have to ship our
    own implementation (mostly a copy&paste from the `multipart` module)
    defnull committed Nov 4, 2023
    Configuration menu
    Copy the full SHA
    2b3571c View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2024

  1. First working version of the new multipart parser.

    The new parser is used for all python versions, which may break backwards compatibility for certain edge cases and error scenarios. For a 'good' request there should be no difference, though.
    
    What changed:
    * Lax newline parsing (accepting \r or \n in place of \r\n) is a security risk and no longer implemented. Most modern browsers and client libraries follow the spec and should not have any issues producing valid multipart data.
    * Parsing errors are no longer silently ignored, but trigger an appropiate 400 error.
    defnull committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    e3b1d0f View commit details
    Browse the repository at this point in the history