Fix archive.extracted with encoded password

This commit is contained in:
Twangboy 2022-11-02 09:19:10 -06:00 committed by Megan Wilhite
parent 6395aea424
commit 865f465e10
2 changed files with 2 additions and 3 deletions

View file

@ -1093,8 +1093,8 @@ def unzip(
source = zfile.read(target)
os.symlink(source, os.path.join(dest, target))
continue
# if password:
# password = password.encode()
if password:
password = password.encode()
zfile.extract(target, dest, password)
if extract_perms:
if not salt.utils.platform.is_windows():

View file

@ -378,7 +378,6 @@ def test_unzip():
assert ["salt"] == ret
@pytest.mark.xfail
def test_unzip_password():
mock = ZipFileMock()
target = "/tmp/salt.zip"