From 283a8dcfaf0b3a7a26f599480241457ada57c08e Mon Sep 17 00:00:00 2001 From: sadilchamishka Date: Tue, 10 Dec 2024 10:12:52 +0530 Subject: [PATCH] Remove fallback mechanism for the signed cookies from super tenant --- .../conditional/auth/functions/http/CookieFunctionImpl.java | 4 ---- .../auth/functions/http/GetCookieFunctionImpl.java | 4 ---- 2 files changed, 8 deletions(-) diff --git a/components/org.wso2.carbon.identity.conditional.auth.functions.http/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/http/CookieFunctionImpl.java b/components/org.wso2.carbon.identity.conditional.auth.functions.http/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/http/CookieFunctionImpl.java index 45cfc5b1..ebcbf190 100644 --- a/components/org.wso2.carbon.identity.conditional.auth.functions.http/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/http/CookieFunctionImpl.java +++ b/components/org.wso2.carbon.identity.conditional.auth.functions.http/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/http/CookieFunctionImpl.java @@ -187,10 +187,6 @@ public String getCookieValue(JsServletRequest request, Object... params) { .getTenantDomain(); boolean isValid = IdentityUtil.validateSignatureFromTenant(valueString, signature, tenantDomain); - // Fallback mechanism for already signed cookies. - if (!isValid) { - isValid = SignatureUtil.validateSignature(valueString, signature); - } if (!isValid) { log.error("Cookie signature didn't matched with the cookie value."); return null; diff --git a/components/org.wso2.carbon.identity.conditional.auth.functions.http/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/http/GetCookieFunctionImpl.java b/components/org.wso2.carbon.identity.conditional.auth.functions.http/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/http/GetCookieFunctionImpl.java index e70535a6..5ac0aa33 100644 --- a/components/org.wso2.carbon.identity.conditional.auth.functions.http/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/http/GetCookieFunctionImpl.java +++ b/components/org.wso2.carbon.identity.conditional.auth.functions.http/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/http/GetCookieFunctionImpl.java @@ -104,10 +104,6 @@ public String getCookieValue(JsServletRequest request, Object... params) { String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext() .getTenantDomain(); boolean isValid = IdentityUtil.validateSignatureFromTenant(valueString, signature, tenantDomain); - // Fallback mechanism for already signed cookies. - if (!isValid) { - isValid = SignatureUtil.validateSignature(valueString, signature); - } if (!isValid) { log.error("Cookie signature didn't matched with the cookie value."); return null;