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

Patch for get_filename in email.message when content-disposition is missing #51331

Closed
DazWorrall mannequin opened this issue Oct 8, 2009 · 6 comments
Closed

Patch for get_filename in email.message when content-disposition is missing #51331

DazWorrall mannequin opened this issue Oct 8, 2009 · 6 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@DazWorrall
Copy link
Mannequin

DazWorrall mannequin commented Oct 8, 2009

BPO 7082
Nosy @warsaw, @bitdancer
Files
  • message-getfilename.patch: Patch against 2.7 trunk
  • 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/bitdancer'
    closed_at = <Date 2009-10-27.23:42:47.088>
    created_at = <Date 2009-10-08.12:38:33.522>
    labels = ['type-bug', 'library']
    title = 'Patch for get_filename in email.message when content-disposition is missing'
    updated_at = <Date 2009-10-27.23:42:47.087>
    user = 'https://bugs.python.org/DazWorrall'

    bugs.python.org fields:

    activity = <Date 2009-10-27.23:42:47.087>
    actor = 'r.david.murray'
    assignee = 'r.david.murray'
    closed = True
    closed_date = <Date 2009-10-27.23:42:47.088>
    closer = 'r.david.murray'
    components = ['Library (Lib)']
    creation = <Date 2009-10-08.12:38:33.522>
    creator = 'DazWorrall'
    dependencies = []
    files = ['15080']
    hgrepos = []
    issue_num = 7082
    keywords = ['patch']
    message_count = 6.0
    messages = ['93743', '93744', '93759', '93783', '93816', '94593']
    nosy_count = 3.0
    nosy_names = ['barry', 'r.david.murray', 'DazWorrall']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue7082'
    versions = ['Python 2.6', 'Python 3.1', 'Python 2.7', 'Python 3.2']

    @DazWorrall
    Copy link
    Mannequin Author

    DazWorrall mannequin commented Oct 8, 2009

    Finger spasm submitted this without a comment, apologies.

    I believe the fix applied in http://bugs.python.org/issue1403349 is not
    actually correct. In the case where Content-Disposition is missing, the
    'name' parameter should be on Content-Type - but the original patch
    looks for 'name' on Content-Disposition, which doesn't exist.

    @DazWorrall DazWorrall mannequin added the stdlib Python modules in the Lib dir label Oct 8, 2009
    @DazWorrall
    Copy link
    Mannequin Author

    DazWorrall mannequin commented Oct 8, 2009

    Patch is against 2.7 trunk, but should backport without any resistance.

    @DazWorrall DazWorrall mannequin changed the title Patch for get attachments in email Patch for get_filename in email.message when content-disposition is missing Oct 8, 2009
    @bitdancer
    Copy link
    Member

    2.4 and 2.5 are open only for security patches, which this is not, so
    I've removed them from versions, and added 3.1 and 3.2, which have the
    same code.

    The patch looks appropriate to me, and is what the original bug report
    requested.

    Note that the Content-Type name parameter has been deprecated for a long
    time...see for example this thread:
    http://www.imc.org/ietf-822/old-archive2/msg02121.html. Support is
    still required, however, since Microsoft's .NET framework, at least,
    still supports setting the parameter (see
    http://msdn.microsoft.com/en-us/library/system.net.mime.contenttype.name.aspx)

    @bitdancer bitdancer added the type-bug An unexpected behavior, bug, or error label Oct 8, 2009
    @DazWorrall
    Copy link
    Mannequin Author

    DazWorrall mannequin commented Oct 9, 2009

    Indeed, I'm certainly not constructing messages like that, but
    occasionally have to process them :)

    RE: the python versions, I'll remember that in future, thanks.

    @bitdancer bitdancer self-assigned this Oct 9, 2009
    @bitdancer
    Copy link
    Member

    Applied to trunk in r75301, py3k in r75307, and 3.1 in r75308. Leaving
    open until I can backport it to 2.6. Thanks, Darren.

    @bitdancer
    Copy link
    Member

    Fixed in 2.6 in r75897.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant