Skip to content

Commit 85ba68b

Browse files
committed
ssh kitten: When using python interpreter fix symlinks with absolute paths not working with the copy command
1 parent 04f28e4 commit 85ba68b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

shell-integration/ssh/bootstrap.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ def get_data():
212212
data = base64.standard_b64decode(data)
213213
with temporary_directory(dir=HOME, prefix='.kitty-ssh-kitten-untar-') as tdir, tarfile.open(fileobj=io.BytesIO(data)) as tf:
214214
try:
215-
tf.extractall(tdir, filter='data')
215+
# We have to use fully_trusted as otherwise it refuses to extract,
216+
# for example, symlinks that point to absolute paths outside
217+
# tdir.
218+
tf.extractall(tdir, filter='fully_trusted')
216219
except TypeError:
217220
tf.extractall(tdir)
218221
with open(tdir + '/data.sh') as f:

0 commit comments

Comments
 (0)