From 933dec27b432d9370190da22c9ef5b5a33addeb4 Mon Sep 17 00:00:00 2001 From: haburger Date: Wed, 18 Dec 2024 07:39:24 +0000 Subject: [PATCH] new configuration version --- ...-nevisproxy-idp-0ceb05c56644a59d648c13b9.yaml | 2 +- ...esource_service_countries_security_filter.lua | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/proxy-idp/etc/nevis/k8s-nevisproxy-idp-0ceb05c56644a59d648c13b9.yaml b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/proxy-idp/etc/nevis/k8s-nevisproxy-idp-0ceb05c56644a59d648c13b9.yaml index e060728..a40df40 100644 --- a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/proxy-idp/etc/nevis/k8s-nevisproxy-idp-0ceb05c56644a59d648c13b9.yaml +++ b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/proxy-idp/etc/nevis/k8s-nevisproxy-idp-0ceb05c56644a59d648c13b9.yaml @@ -46,7 +46,7 @@ spec: podDisruptionBudget: maxUnavailable: "50%" git: - tag: "r-3d5124a6dc9c177bf140282895b219df06f36804" + tag: "r-ad714e65042728051bc6dee19704df817b9c40b2" dir: "DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/proxy-idp" credentials: "git-credentials" keystores: diff --git a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/proxy-idp/var/opt/nevisproxy/default/host-auth.agov-w.azure.adnovum.net/WEB-INF/utility_resource_service_countries_security_filter.lua b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/proxy-idp/var/opt/nevisproxy/default/host-auth.agov-w.azure.adnovum.net/WEB-INF/utility_resource_service_countries_security_filter.lua index 546c800..cd7aeea 100644 --- a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/proxy-idp/var/opt/nevisproxy/default/host-auth.agov-w.azure.adnovum.net/WEB-INF/utility_resource_service_countries_security_filter.lua +++ b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/proxy-idp/var/opt/nevisproxy/default/host-auth.agov-w.azure.adnovum.net/WEB-INF/utility_resource_service_countries_security_filter.lua @@ -28,8 +28,22 @@ function inputHeader(req, resp) resp:send(404) return end + local count = 0 if values ~= nil then - trace:info("Query param " .. param .. " value is " .. type(values)) + for i, value in pairs(values) do + count = count + 1 + local lang = string.upper(value) + if not validLanguages[lang] then + trace:info("utility service called with invalid value for query param " .. param .. "=" .. value) + resp:send(404) + return + end + end + end + if count ~= 1 + trace:info("utility service called with invalid values for query param " .. param) + resp:send(404) + return end end