| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1067,7 +1067,8 @@ can be: | |||
| 1067 | 1067 | ||
| 1068 | 1068 | * the string ``'tar'``: Honor most *tar*-specific features (i.e. features of | |
| 1069 | 1069 | UNIX-like filesystems), but block features that are very likely to be | |
| 1070 | - surprising or malicious. See :func:`tar_filter` for details. | ||
| 1070 | + surprising or malicious. Note that this filter does not limit the targets of | ||
| 1071 | + symbolic links. See :func:`tar_filter` for details. | ||
| 1071 | 1072 | ||
| 1072 | 1073 | * the string ``'data'``: Ignore or block most features specific to UNIX-like | |
| 1073 | 1074 | filesystems. Intended for extracting cross-platform data archives. | |
@@ -1135,6 +1136,17 @@ reused in custom filters: | |||
| 1135 | 1136 | ||
| 1136 | 1137 | Return the modified ``TarInfo`` member. | |
| 1137 | 1138 | ||
| 1139 | + .. warning:: | ||
| 1140 | + This filter does not check :attr:`TarInfo.linkname`. This means it does | ||
| 1141 | + not limit where a symbolic link member points. An absolute symbolic-link | ||
| 1142 | + target will remain absolute, and a relative target may resolve outside the | ||
| 1143 | + extraction destination. The destination path protection described above | ||
| 1144 | + concerns only where the archive member itself is written, not where a | ||
| 1145 | + symbolic link resolves. The stricter :func:`data_filter` rejects these | ||
| 1146 | + unsafe link targets, raising :class:`~tarfile.AbsoluteLinkError` for | ||
| 1147 | + absolute link targets or :class:`~tarfile.LinkOutsideDestinationError` | ||
| 1148 | + for link targets outside the destination. | ||
| 1149 | + | ||
| 1138 | 1150 | .. versionchanged:: next | |
| 1139 | 1151 | ||
| 1140 | 1152 | Filenames containing ``..`` components are now normalized. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments