From d49f1786033cc64ac8d72479a9014044b3f0bc0c Mon Sep 17 00:00:00 2001 From: emelinda Date: Sun, 8 Nov 2026 22:54:49 +0300 Subject: [PATCH] =?UTF-8?q?istio-config/uralkal:=20harden=20decode-zitadel?= =?UTF-8?q?-headers=20=E2=80=94=20replace=20only=20with=20numeric=20ids,?= =?UTF-8?q?=20drop=20the=20header=20otherwise?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- infrastructure/istio-config/uralkal/istio-config.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/infrastructure/istio-config/uralkal/istio-config.yaml b/infrastructure/istio-config/uralkal/istio-config.yaml index ecbde5f..2de2cd5 100644 --- a/infrastructure/istio-config/uralkal/istio-config.yaml +++ b/infrastructure/istio-config/uralkal/istio-config.yaml @@ -196,8 +196,13 @@ spec: end local decoded = base64_decode(value) - if decoded and decoded ~= "" then + -- Отличие от prod: заменяем только на ожидаемый вид (id/список id), + -- иначе удаляем заголовок — мусорные байты валят приложение + -- ("invalid header value for: x-user-id"). + if decoded and decoded:match("^[%d,]+$") then handle:headers():replace(header_name, decoded) + else + handle:headers():remove(header_name) end end