From 644e36fb1259fb4bece4e1a8a88017ad91a7ec1b Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 8 May 2025 10:28:06 -0500 Subject: [PATCH] ensure role is comma separated and stripped correctly --- frigate/api/auth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frigate/api/auth.py b/frigate/api/auth.py index 710661be3..1a267b521 100644 --- a/frigate/api/auth.py +++ b/frigate/api/auth.py @@ -268,7 +268,9 @@ def auth(request: Request): # if comma-separated with "admin", use "admin", else use default role success_response.headers["remote-role"] = ( - "admin" if role and "admin" in role else proxy_config.default_role + "admin" + if role and "admin" in [r.strip() for r in role.split(",")] + else proxy_config.default_role ) return success_response