GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT · Issue #88233 · python/cpython

Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT #88233

New issue
Copy link
New issue
Copy link
Closed
#96161
Closed
Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT#88233
#96161
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

shaanbhaya
mannequin
opened on May 7, 2021
Issue body actions
BPO 44067
Nosy @Yhg1s, @serhiy-storchaka
Files
  • zip_bug.zip
  • 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 = None
    created_at = <Date 2021-05-07.08:18:55.383>
    labels = ['type-bug', '3.8', '3.9', '3.10', '3.11', '3.7', 'library']
    title = 'Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT'
    updated_at = <Date 2021-11-07.00:34:59.007>
    user = 'https://bugs.python.org/shaanbhaya'

    bugs.python.org fields:

    activity = <Date 2021-11-07.00:34:59.007>
    actor = 'anadius'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2021-05-07.08:18:55.383>
    creator = 'shaanbhaya'
    dependencies = []
    files = ['50025']
    hgrepos = []
    issue_num = 44067
    keywords = []
    message_count = 3.0
    messages = ['393178', '393179', '405760']
    nosy_count = 5.0
    nosy_names = ['twouters', 'alanmcintyre', 'serhiy.storchaka', 'shaanbhaya', 'anadius']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue44067'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10', 'Python 3.11']

    Linked PRs

    • gh-88233: zipfile: handle extras after a zip64 extra #96161
    • gh-88233: zipfile: refactor _strip_extra #102083
    • gh-88233: zipfile: refactor _strip_extra #102084
    • [3.11] gh-88233: zipfile: handle extras after a zip64 extra (GH-96161) #102086
    • [3.10] gh-88233: zipfile: handle extras after a zip64 extra (GH-96161) #102087

    Activity

    Next
    1. shaanbhaya commented on May 7, 2021

      @shaanbhaya
      shaanbhayamannequin
      on May 7, 2021
      MannequinAuthor
      More actions

      The current zipFile implementation supports the allowZip64,which can make large zip files.
      There is a bug in the current implementation of close method, where the extra field is overwritten.

      To reproduce it:

      1. Create a directory with more then 4 GB of data(spread over many files).
      2. Make the zip of those files using the any rar achiever which adds NTFS metadata (mtime, atime, and ctime) of files in the zip.
      3. Append a new file to the zip using the zip library .

      When I open the zip again, the files processed after the ZIP64_LIMIT is reached will have their extra fields overwritten.

      I have attached the zip that contained the python used to add the new file and the images of zip archive before adding new files and after.

    2. shaanbhaya
      added
      3.7 (EOL)end of lifeend of life
      3.8 (EOL)end of lifeend of life
      3.9 (EOL)end of lifeend of life
      3.10 (EOL)end of lifeend of life
      3.11only security fixesonly security fixes
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      on May 7, 2021
    3. 11 remaining items

    4. miss-islington
      closed this as completedin #96161on Feb 20, 2023
    5. github-project-automation
      moved this to Done in Zipfile issues 📦on Feb 20, 2023
    6. github-project-automation
      moved this to Done in @serhiy-storchaka's project python-zipfileon Feb 20, 2023
    7. miss-islington
      added 4 commits that reference this issue on Feb 20, 2023

      gh-88233: zipfile: handle extras after a zip64 extra (GH-96161)

      59e86ca

      pythongh-88233: zipfile: handle extras after a zip64 extra (pythonGH-…

      8efac30

      pythongh-88233: zipfile: handle extras after a zip64 extra (pythonGH-…

      0959162

      gh-88233: zipfile: handle extras after a zip64 extra (GH-96161)

      62c0327
    8. carljm
      added 2 commits that reference this issue on Feb 20, 2023

      Merge branch 'main' into inlinecomp2

      9f0fc5b

      Merge branch 'main' into inlinecomp

      544b30c
    9. ambv
      added a commit that references this issue on Mar 28, 2023

      [3.10] gh-88233: zipfile: handle extras after a zip64 extra (GH-96161) (

      d445147
    10. jaraco
      added a commit that references this issue on Sep 25, 2023

      gh-88233: zipfile: refactor _strip_extra (#102084)

      e9791ba
    11. csm10495
      added a commit that references this issue on Sep 28, 2023

      pythongh-88233: zipfile: refactor _strip_extra (python#102084)

      b3ee6d0
    12. python-sidebar
      added 2 commits that reference this issue on Sep 1, 2024

      pythongh-88233: zipfile: handle extras after a zip64 extra (pythonGH-…

      12d27d8

      pythongh-88233: zipfile: handle extras after a zip64 extra (pythonGH-…

      676b772
    13. Glyphack
      added a commit that references this issue on Sep 2, 2024

      pythongh-88233: zipfile: refactor _strip_extra (python#102084)

      9e459a1
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

      Projects

      • Zipfile issues 📦
        Status
        Done
        Show more project fields

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.