fix(auth): correct internal secret validation logic in InternalAuthFilter
Build & Test (NowChessSystems) TeamCity build finished

This commit is contained in:
2026-05-03 13:12:50 +02:00
parent 4a145cb538
commit 85b187293f
2 changed files with 19 additions and 12 deletions
@@ -23,5 +23,5 @@ class InternalAuthFilter extends ContainerRequestFilter:
override def filter(ctx: ContainerRequestContext): Unit =
if authEnabled then
val header = Option(ctx.getHeaderString("X-Internal-Secret"))
if header.isEmpty || header.get.equals(secret) then
if header.isEmpty || (!header.get.equals(secret)) then
ctx.abortWith(Response.status(Response.Status.UNAUTHORIZED).build())