depot/third_party/nixpkgs/pkgs/servers/home-assistant/patches/static-follow-symlinks.patch
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

12 lines
589 B
Diff

diff --git a/homeassistant/components/http/static.py b/homeassistant/components/http/static.py
index e6e773d4c0..b53e0b4a11 100644
--- a/homeassistant/components/http/static.py
+++ b/homeassistant/components/http/static.py
@@ -31,7 +31,6 @@ def _get_file_path(rel_url: str, directory: Path) -> Path | None:
# where the static dir is totally different
raise HTTPForbidden
filepath: Path = directory.joinpath(filename).resolve()
- filepath.relative_to(directory)
# on opening a dir, load its contents if allowed
if filepath.is_dir():
return None