File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1107,6 +1107,10 @@ reused in custom filters:
11071107 paths (in case the name is absolute
11081108 even after stripping slashes, e.g. ``C:/foo `` on Windows).
11091109 This raises :class: `~tarfile.AbsolutePathError `.
1110+ - Normalize filenames (:attr: `TarInfo.name `) that contain ``.. `` components
1111+ using :func: `os.path.normpath `.
1112+ Note that this removes internal ``.. `` components, which may change the
1113+ meaning of the name if it traverses symbolic links.
11101114 - :ref: `Refuse <tarfile-extraction-refuse >` to extract files whose absolute
11111115 path (after following symlinks) would end up outside the destination.
11121116 This raises :class: `~tarfile.OutsideDestinationError `.
@@ -1115,6 +1119,10 @@ reused in custom filters:
11151119
11161120 Return the modified ``TarInfo `` member.
11171121
1122+ .. versionchanged :: next
1123+
1124+ Filenames containing ``.. `` components are now normalized.
1125+
11181126.. function :: data_filter(member, path)
11191127
11201128 Implements the ``'data' `` filter.
You can’t perform that action at this time.
0 commit comments