Skip to content

Commit 9a2e052

Browse files
committed
revert tar security fix, since tarfile.data_filter is busted in many python versions
- see: python/cpython#107845
1 parent 7cbf6ba commit 9a2e052

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

comfy_cli/utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ def _filter(tinfo: tarfile.TarInfo, _path: PathLike):
173173
barProg.advance(barTask, _size)
174174
_size = tinfo.size
175175

176-
return tarfile.data_filter(tinfo, _path)
176+
# TODO: ideally we'd use data_filter here, but it's busted: https://github.com/python/cpython/issues/107845
177+
# return tarfile.data_filter(tinfo, _path)
178+
return tinfo
177179
else:
178180
_filter = None
179181

@@ -215,13 +217,13 @@ def create_tarball(
215217

216218
_size = 0
217219

218-
def _filter(tinfo: tarfile.TarInfo, _path: PathLike):
220+
def _filter(tinfo: tarfile.TarInfo):
219221
nonlocal _size
220222
pathProg.update(pathTask, description=tinfo.path)
221223
barProg.advance(barTask, _size)
222224
_size = Path(tinfo.path).stat().st_size
223225

224-
return tarfile.data_filter(tinfo, _path)
226+
return tinfo
225227
else:
226228
_filter = None
227229

0 commit comments

Comments
 (0)