diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index a11c9a02df25..2024892c78e6 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -55,7 +55,7 @@ Pillow==12.3.0 probatio==0.13.0 propcache==0.5.4 psutil-home-assistant==0.0.1 -PyJWT==2.13.0 +PyJWT==2.15.1 pymicro-vad==1.0.1 PyNaCl==1.6.2 pyopenssl==26.4.0 diff --git a/pyproject.toml b/pyproject.toml index 2ab510db9b9d..2748d02dfbb0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ dependencies = [ "ifaddr==0.2.0", "Jinja2==3.1.6", "lru-dict==1.4.1", - "PyJWT==2.13.0", + "PyJWT==2.15.1", # PyJWT has loose dependency. We want the latest one. "cryptography==50.0.1", "Pillow==12.3.0", diff --git a/requirements.txt b/requirements.txt index aa925a05d83b..9457a62ec6a2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -41,7 +41,7 @@ Pillow==12.3.0 probatio==0.13.0 propcache==0.5.4 psutil-home-assistant==0.0.1 -PyJWT==2.13.0 +PyJWT==2.15.1 pymicro-vad==1.0.1 pyopenssl==26.4.0 pyspeex-noise==1.0.2 diff --git a/tests/components/august/conftest.py b/tests/components/august/conftest.py index ed76a1883226..a18302e88ddd 100644 --- a/tests/components/august/conftest.py +++ b/tests/components/august/conftest.py @@ -1,5 +1,6 @@ """August tests conftest.""" +import base64 from unittest.mock import patch import pytest @@ -94,7 +95,13 @@ def load_reauth_jwt_fixture() -> str: @pytest.fixture(name="migration_jwt") def load_migration_jwt_fixture() -> str: """Load migration JWT fixture data (has email for legacy migration).""" - return load_fixture("migration_jwt", DOMAIN).strip("\n") + token = load_fixture("migration_jwt", DOMAIN).strip() + header, payload, signature = token.split(".") + signature_bytes = base64.urlsafe_b64decode(signature + "=" * (-len(signature) % 4)) + canonical_signature = ( + base64.urlsafe_b64encode(signature_bytes).rstrip(b"=").decode() + ) + return f"{header}.{payload}.{canonical_signature}" @pytest.fixture(name="reauth_jwt_wrong_account")