mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 16:37:27 +00:00
ssh kitten: When using python interpreter fix symlinks with absolute paths not working with the copy command
This commit is contained in:
parent
04f28e4b7a
commit
85ba68b59c
1 changed files with 4 additions and 1 deletions
|
|
@ -212,7 +212,10 @@ def get_data():
|
|||
data = base64.standard_b64decode(data)
|
||||
with temporary_directory(dir=HOME, prefix='.kitty-ssh-kitten-untar-') as tdir, tarfile.open(fileobj=io.BytesIO(data)) as tf:
|
||||
try:
|
||||
tf.extractall(tdir, filter='data')
|
||||
# We have to use fully_trusted as otherwise it refuses to extract,
|
||||
# for example, symlinks that point to absolute paths outside
|
||||
# tdir.
|
||||
tf.extractall(tdir, filter='fully_trusted')
|
||||
except TypeError:
|
||||
tf.extractall(tdir)
|
||||
with open(tdir + '/data.sh') as f:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue