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

Improve zipfile handling of corrupted extra field #73960

Closed
serhiy-storchaka opened this issue Mar 9, 2017 · 4 comments
Closed

Improve zipfile handling of corrupted extra field #73960

serhiy-storchaka opened this issue Mar 9, 2017 · 4 comments
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

BPO 29774
Nosy @vstinner, @serhiy-storchaka
PRs
  • bpo-29774: Improve error reporting for corrupted extra field in ZIP f… #583
  • 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 = None
    closed_at = <Date 2017-03-09.16:48:24.053>
    created_at = <Date 2017-03-09.15:27:35.689>
    labels = ['3.7', 'type-feature', 'library']
    title = 'Improve zipfile handling of corrupted extra field'
    updated_at = <Date 2017-03-24.22:38:20.480>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2017-03-24.22:38:20.480>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-03-09.16:48:24.053>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2017-03-09.15:27:35.689>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 29774
    keywords = []
    message_count = 4.0
    messages = ['289302', '289307', '289311', '290249']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'serhiy.storchaka']
    pr_nums = ['583']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue29774'
    versions = ['Python 3.7']

    @serhiy-storchaka
    Copy link
    Member Author

    The zipfile module can raise struct.error when process corrupted extra field. This issue was partially resolved by bpo-14315. Following PR converts struct.error to BadZipFile in other case.

    @serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error 3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement and removed type-bug An unexpected behavior, bug, or error labels Mar 9, 2017
    @vstinner
    Copy link
    Member

    vstinner commented Mar 9, 2017

    I merged your PR, thanks!

    I don't think that this minor enhancement on error message is worth it to be backported. It only impacts corrupted ZIP files, and 3.6 and older already raise an error message.

    I updated manually the PR status, it seems like the GitHub bot is still broken.

    @serhiy-storchaka
    Copy link
    Member Author

    I think the same.

    @vstinner
    Copy link
    Member

    New changeset feccdb2 by Victor Stinner (Serhiy Storchaka) in branch 'master':
    bpo-29774: Improve error reporting for corrupted extra field in ZIP file. (#583)
    feccdb2

    @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
    3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants