Skip to content

NVR with realtime local object detection for IP cameras

fix(auth): Added trimming to jwt secret token read from .jwt_secret (#16467)

MkSavinbea6cf29c227
diff --git a/frigate/api/auth.py b/frigate/api/auth.py
index 91ca5e729f..c0ed94d5c6 100644
--- a/frigate/api/auth.py
+++ b/frigate/api/auth.py
@@ -136,7 +136,7 @@ def get_jwt_secret() -> str:
logger.debug("Using jwt secret from .jwt_secret file in config directory.")
with open(jwt_secret_file) as f:
try:
- jwt_secret = f.readline()
+ jwt_secret = f.readline().strip()
except Exception:
logger.warning(
"Unable to read jwt token from .jwt_secret file in config directory. A new jwt token will be created at each startup."