From b3eab17f2c9319320c71a95e546da5404bc7200e Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Tue, 11 Jun 2024 07:53:12 -0500 Subject: [PATCH] just check for secret file specifically (#11877) * just check for secret file specifically * add josh to funding --- .github/FUNDING.yml | 1 + frigate/api/auth.py | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index d212efb04..b8892ce80 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ github: - blakeblackshear - NickM-27 + - hawkeye217 diff --git a/frigate/api/auth.py b/frigate/api/auth.py index ff1fa6bff..96bd9e2b2 100644 --- a/frigate/api/auth.py +++ b/frigate/api/auth.py @@ -87,11 +87,7 @@ def get_jwt_secret() -> str: ) jwt_secret = os.environ.get(JWT_SECRET_ENV_VAR) # check docker secrets - elif ( - os.path.isdir("/run/secrets") - and os.access("/run/secrets", os.R_OK) - and JWT_SECRET_ENV_VAR in os.listdir("/run/secrets") - ): + elif os.path.isfile(os.path.join("/run/secrets", JWT_SECRET_ENV_VAR)): logger.debug(f"Using jwt secret from {JWT_SECRET_ENV_VAR} docker secret file.") jwt_secret = Path(os.path.join("/run/secrets", JWT_SECRET_ENV_VAR)).read_text() # check for the addon options file