Skip to content

Commit c22dd8f

Browse files
dependabot[bot]Mansoor Sarfraz
andauthored
{Packaging} Bump pyjwt from 2.13.0 to 2.15.0 in /src/azure-cli (#34152)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mansoor Sarfraz <msarfraz+microsoft@microsoft.com>
1 parent e93d12c commit c22dd8f

5 files changed

Lines changed: 11 additions & 15 deletions

File tree

‎src/azure-cli/azure/cli/command_modules/acs/custom.py‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2658,7 +2658,7 @@ def redirect_request(self, req, fp, code, msg, headers, newurl):
26582658

26592659

26602660
def _extract_aks_desktop_archive_compat(archive, destination):
2661-
# Python 3.10.0-3.10.11 and 3.11.0-3.11.3 have no tar extraction filters.
2661+
# Keep path validation consistent across Python data-filter implementations.
26622662
root = os.path.realpath(destination)
26632663

26642664
def contained_path(path):
@@ -2746,11 +2746,7 @@ def _extract_aks_desktop_archive(archive_path, destination):
27462746
# Older data filters resolve these names differently from extraction (CPython gh-149486).
27472747
if (member.issym() or member.islnk()) and member.name.endswith(('/', '\\')):
27482748
raise FileOperationError('The AKS Desktop archive contains an unsafe link name.')
2749-
# Check each member against the filesystem state left by earlier members.
2750-
if getattr(tarfile, 'data_filter', None) is not None:
2751-
archive.extractall(destination, filter='data')
2752-
else:
2753-
_extract_aks_desktop_archive_compat(archive, destination)
2749+
_extract_aks_desktop_archive_compat(archive, destination)
27542750
except (OSError, tarfile.TarError) as ex:
27552751
raise FileOperationError(
27562752
'Failed to extract the AKS Desktop archive ({}).'.format(ex))

‎src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_custom.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,19 +1316,19 @@ def test_aks_install_desktop_digest_failure_prevents_launch(
13161316

13171317
@contextmanager
13181318
def _aks_desktop_archive_extractor(self, fallback):
1319-
if fallback:
1320-
# Match the old API: accepting filter= must fail, and an unfiltered call is never safe.
1321-
def legacy_extractall(archive, path='.', members=None, *, numeric_owner=False):
1322-
raise AssertionError('The compatibility extractor must not call extractall')
1319+
def legacy_extractall(archive, path='.', members=None, *, numeric_owner=False):
1320+
raise AssertionError('The compatibility extractor must not call extractall')
13231321

1322+
if fallback:
13241323
with mock.patch.object(tarfile, 'data_filter', None, create=True), \
13251324
mock.patch.object(tarfile.TarFile, 'extractall', legacy_extractall):
13261325
yield
13271326
else:
13281327
if not hasattr(tarfile, 'data_filter'):
13291328
self.skipTest('Native tar extraction filters unavailable')
1330-
# Exercise pre-3.14 defaults even on newer Python.
1331-
with mock.patch.object(tarfile.TarFile, 'extraction_filter',
1329+
# Exercise both filter API states; extraction always uses the strict CLI validator.
1330+
with mock.patch.object(tarfile.TarFile, 'extractall', legacy_extractall), \
1331+
mock.patch.object(tarfile.TarFile, 'extraction_filter',
13321332
staticmethod(lambda member, path: member), create=True):
13331333
yield
13341334

‎src/azure-cli/requirements.py3.Darwin.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ portalocker==3.2.0
123123
psutil==6.1.0
124124
pycomposefile==0.0.34
125125
PyGithub==1.55
126-
PyJWT==2.13.0
126+
PyJWT==2.15.0
127127
PyNaCl==1.6.2
128128
pyOpenSSL==26.2.0
129129
PySocks==1.7.1

‎src/azure-cli/requirements.py3.Linux.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ portalocker==3.2.0
124124
psutil==6.1.0
125125
pycomposefile==0.0.34
126126
PyGithub==1.55
127-
PyJWT==2.13.0
127+
PyJWT==2.15.0
128128
PyNaCl==1.6.2
129129
pyOpenSSL==26.2.0
130130
PySocks==1.7.1

‎src/azure-cli/requirements.py3.windows.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ portalocker==3.2.0
123123
psutil==6.1.0
124124
pycomposefile==0.0.34
125125
PyGithub==1.55
126-
PyJWT==2.13.0
126+
PyJWT==2.15.0
127127
pymsalruntime==0.20.6
128128
PyNaCl==1.6.2
129129
pyOpenSSL==26.2.0

0 commit comments

Comments
 (0)