diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 0248e3c6612d..db077c1978b8 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -306,6 +306,9 @@ python.pkgs.buildPythonApplication rec { # leave this in, so users don't have to constantly update their downstream patch handling patches = [ + # https://github.com/home-assistant/core/pull/165143 + ./pyjwt-2.11.patch + # Follow symlinks in /var/lib/hass/www ./patches/static-follow-symlinks.patch diff --git a/pkgs/servers/home-assistant/pyjwt-2.11.patch b/pkgs/servers/home-assistant/pyjwt-2.11.patch new file mode 100644 index 000000000000..bbcf97af3000 --- /dev/null +++ b/pkgs/servers/home-assistant/pyjwt-2.11.patch @@ -0,0 +1,54 @@ +diff --git a/homeassistant/auth/jwt_wrapper.py b/homeassistant/auth/jwt_wrapper.py +index 464df006f5f..0a9c7c4a2ec 100644 +--- a/homeassistant/auth/jwt_wrapper.py ++++ b/homeassistant/auth/jwt_wrapper.py +@@ -21,7 +21,9 @@ MAX_TOKEN_SIZE = 8192 + _VERIFY_KEYS = ("signature", "exp", "nbf", "iat", "aud", "iss", "sub", "jti") + + _VERIFY_OPTIONS: dict[str, Any] = {f"verify_{key}": True for key in _VERIFY_KEYS} | { +- "require": [] ++ "require": [], ++ "strict_aud": False, ++ "enforce_minimum_key_length": False, + } + _NO_VERIFY_OPTIONS = {f"verify_{key}": False for key in _VERIFY_KEYS} + +diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt +index b0ebcfd61d0..e4b36f04637 100644 +--- a/homeassistant/package_constraints.txt ++++ b/homeassistant/package_constraints.txt +@@ -54,7 +54,7 @@ paho-mqtt==2.1.0 + Pillow==12.1.1 + propcache==0.4.1 + psutil-home-assistant==0.0.1 +-PyJWT==2.10.1 ++PyJWT==2.11.0 + pymicro-vad==1.0.1 + PyNaCl==1.6.2 + pyOpenSSL==25.3.0 +diff --git a/pyproject.toml b/pyproject.toml +index 86aeed2fb1e..239780d1dd7 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -59,7 +59,7 @@ dependencies = [ + "ifaddr==0.2.0", + "Jinja2==3.1.6", + "lru-dict==1.3.0", +- "PyJWT==2.10.1", ++ "PyJWT==2.11.0", + # PyJWT has loose dependency. We want the latest one. + "cryptography==46.0.5", + "Pillow==12.1.1", +diff --git a/requirements.txt b/requirements.txt +index bde0cd69e87..637ec0a9933 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -40,7 +40,7 @@ packaging>=23.1 + Pillow==12.1.1 + propcache==0.4.1 + psutil-home-assistant==0.0.1 +-PyJWT==2.10.1 ++PyJWT==2.11.0 + pymicro-vad==1.0.1 + pyOpenSSL==25.3.0 + pyspeex-noise==1.0.2