<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/shutil.py, branch 3.10</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/shutil.py?h=3.10</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/shutil.py?h=3.10'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2026-08-10T07:32:59Z</updated>
<entry>
<title>[3.10] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows (GH-146591) (GH-149071) (#155440)</title>
<updated>2026-08-10T07:32:59Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2026-08-10T07:32:59Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1071290169f85c09cf767c1099564a9426cdc7e8'/>
<id>urn:sha1:1071290169f85c09cf767c1099564a9426cdc7e8</id>
<content type='text'>
[3.11] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows (GH-146591) (GH-149071)

gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows (GH-146591)

Use ZipFile.extractall() to sanitize file names and extract files.

Files with invalid names (e.g. absolute paths) are now skipped.

Files containing ".." in the name are no longer skipped.
(cherry picked from commit 7ef7dd0a74f47facd1fadcbc77f8fb03beb5eb4d)


(cherry picked from commit fc829e88753858c8ac669594bf0093f44948c0f4)

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</content>
</entry>
<entry>
<title>[3.10] gh-102950: Implement PEP 706 – Filter for tarfile.extractall (GH-102953) (GH-104128)</title>
<updated>2023-05-10T11:43:00Z</updated>
<author>
<name>Matěj Cepl</name>
<email>mcepl@cepl.eu</email>
</author>
<published>2023-05-10T11:43:00Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=425065bb002b9cbf9c12f61a6f3102f2ce2b8d14'/>
<id>urn:sha1:425065bb002b9cbf9c12f61a6f3102f2ce2b8d14</id>
<content type='text'>
- Backport b52ad18a766700be14382ba222033b2d75a33521
- Backport c8c3956d905e019101038b018129a4c90c9c9b8f
- Remove the DeprecationWarning
- Adjust docs
- Remove new `__all__` entries

Co-authored-by: Petr Viktorin &lt;encukou@gmail.com&gt;</content>
</entry>
<entry>
<title>bpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)</title>
<updated>2022-11-07T12:08:39Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-11-07T12:08:39Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=eb0e942ca86b177c69a8c3da7e20364d606c83cb'/>
<id>urn:sha1:eb0e942ca86b177c69a8c3da7e20364d606c83cb</id>
<content type='text'>
(cherry picked from commit 5ff81da6d3a8eb01fc5500fd1c9eaa6543286301)

Co-authored-by: Zackery Spytz &lt;zspytz@gmail.com&gt;</content>
</entry>
<entry>
<title>gh-94844: Add pathlib support to shutil archive management (GH-94846)</title>
<updated>2022-07-20T16:24:33Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-07-20T16:24:33Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=cbe3ad51ed63e2e5afc408f0bbeb8bb0e9fb7f44'/>
<id>urn:sha1:cbe3ad51ed63e2e5afc408f0bbeb8bb0e9fb7f44</id>
<content type='text'>
Co-authored-by: Barney Gale &lt;barney.gale@gmail.com&gt;
(cherry picked from commit ed4441567ec480d1e4d8f982bd1f7347e4d03c42)

Co-authored-by: Oleg Iarygin &lt;oleg@arhadthedev.net&gt;</content>
</entry>
<entry>
<title>gh-74696: Do not change the current working directory in shutil.make_archive() if possible (GH-93160) (GH-94106)</title>
<updated>2022-06-22T09:18:37Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-06-22T09:18:37Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e51a22b6f667474be615e313db3de86c4c664b32'/>
<id>urn:sha1:e51a22b6f667474be615e313db3de86c4c664b32</id>
<content type='text'>
It is no longer changed when create a zip or tar archive.

It is still changed for custom archivers registered with shutil.register_archive_format()
if root_dir is not None.

Co-authored-by: Éric &lt;merwok@netwok.org&gt;
Co-authored-by: Łukasz Langa &lt;lukasz@langa.pl&gt;
(cherry picked from commit fda4b2f06364ae5ef91ecd9c09e2af380c8b0b4c)

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</content>
</entry>
<entry>
<title>gh-88513: clarify shutil.copytree's dirs_exist_ok arg (GH-91434) (GH-91464)</title>
<updated>2022-04-15T13:55:13Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-04-15T13:55:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=289f27d06b0d19739b114f6b2f60a6264655b8f6'/>
<id>urn:sha1:289f27d06b0d19739b114f6b2f60a6264655b8f6</id>
<content type='text'>
* add a paragraph to document this kwarg in detail
* update docstring in the source accordingly
(cherry picked from commit f33e2c87a83917b5139d97fd8ef7cba7223ebef5)

Co-authored-by: Jelle Zijlstra &lt;jelle.zijlstra@gmail.com&gt;</content>
</entry>
<entry>
<title>bpo-39327: Close file descriptors as soon as possible in shutil.rmtree (GH-31384)</title>
<updated>2022-02-21T08:07:46Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-02-21T08:07:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=95d6271f1997580f8cb8a2985d0cd48af912763f'/>
<id>urn:sha1:95d6271f1997580f8cb8a2985d0cd48af912763f</id>
<content type='text'>
It fixes the "Text File Busy" OSError when using 'rmtree' on a
windows-managed filesystem in via the VirtualBox shared folder
(and possible other scenarios like a windows-managed network file
system).
(cherry picked from commit b77158b4da449ec5b8f682816a79d004fd65ed07)

Co-authored-by: Lital Natan &lt;litaln@gmail.com&gt;</content>
</entry>
<entry>
<title>bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) (GH-28508)</title>
<updated>2021-09-21T22:14:40Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-09-21T22:14:40Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=41d48bc038b254cc4a78a2d840097196b9545a84'/>
<id>urn:sha1:41d48bc038b254cc4a78a2d840097196b9545a84</id>
<content type='text'>
This was a regression from fixing BPO-43219.
(cherry picked from commit b7eac52b466f697d3e89f47508e0df0196a98970)

Co-authored-by: andrei kulakov &lt;andrei.avk@gmail.com&gt;</content>
</entry>
<entry>
<title>bpo-43219: shutil.copyfile, raise a less confusing exception instead of IsADirectoryError (GH-27049)</title>
<updated>2021-07-10T04:07:35Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-07-10T04:07:35Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1577259cc51d0d46ad676798ce0a130039acf956'/>
<id>urn:sha1:1577259cc51d0d46ad676798ce0a130039acf956</id>
<content type='text'>
Fixes the misleading IsADirectoryError to be FileNotFoundError.
(cherry picked from commit 248173cc0483a9ad9261353302f1234cf9eb2ebe)

Co-authored-by: andrei kulakov &lt;andrei.avk@gmail.com&gt;</content>
</entry>
<entry>
<title>bpo-43650: Fix MemoryError on zip.read in shutil._unpack_zipfile for large files (GH-25058) (GH-26190)</title>
<updated>2021-05-17T17:35:30Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-05-17T17:35:30Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7a588621c2854bcef6ce9eeb54349b84ac078c45'/>
<id>urn:sha1:7a588621c2854bcef6ce9eeb54349b84ac078c45</id>
<content type='text'>
`shutil.unpack_archive()` tries to read the whole file into memory, making no use of any kind of smaller buffer. Process crashes for really large files: I.e. archive: ~1.7G, unpacked: ~10G. Before the crash it can easily take away all available RAM on smaller systems. Had to pull the code form `zipfile.Zipfile.extractall()` to fix this

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit f32c7950e0077b6d9a8e217c2796fc582f18ca08)

Co-authored-by: Igor Bolshakov &lt;ibolsch@gmail.com&gt;</content>
</entry>
</feed>
