Skip to content

cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines #62367

@catlee

Description

@catlee
mannequin
BPO 18167
Nosy @orsenthil, @catlee, @florentx, @serhiy-storchaka
Files
  • cgi-test-cpython.patch: test for handling of 65,535 byte files without newlines
  • cgi-cpython.patch: proposed fix
  • test_cgi_server.py: simple http server that demonstrates failure
  • issue18167-2.7.patch: Patch for 2.7
  • issue18167-3.3.patch: Patch for 3.3
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2013-06-17.13:39:17.682>
    created_at = <Date 2013-06-08.00:46:59.026>
    labels = ['type-bug', 'library']
    title = 'cgi.FieldStorage fails to handle multipart/form-data when \\r\\n appears at end of 65535 bytes without other newlines'
    updated_at = <Date 2013-06-17.13:39:17.681>
    user = 'https://github.com/catlee'

    bugs.python.org fields:

    activity = <Date 2013-06-17.13:39:17.681>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2013-06-17.13:39:17.682>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2013-06-08.00:46:59.026>
    creator = 'catlee'
    dependencies = []
    files = ['30502', '30503', '30529', '30553', '30554']
    hgrepos = []
    issue_num = 18167
    keywords = ['patch']
    message_count = 7.0
    messages = ['190784', '190785', '190914', '191019', '191208', '191212', '191333']
    nosy_count = 7.0
    nosy_names = ['orsenthil', 'catlee', 'flox', 'python-dev', 'serhiy.storchaka', 'Ben.Hearsum', 'rail']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue18167'
    versions = ['Python 2.7', 'Python 3.3', 'Python 3.4']

    Metadata

    Metadata

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions