From f45c6e97cb2534e0e8ac56287b9c7fb0341b6bfe Mon Sep 17 00:00:00 2001 From: VivekVinushanth Date: Wed, 4 Dec 2024 09:47:54 +0530 Subject: [PATCH] Fix alor --- .../src/main/webapp/password-reset-complete.jsp | 3 ++- .../src/main/webapp/self-registration-process.jsp | 3 +-- .../webapp/self-registration-with-verification-confirm.jsp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/identity-apps-core/apps/recovery-portal/src/main/webapp/password-reset-complete.jsp b/identity-apps-core/apps/recovery-portal/src/main/webapp/password-reset-complete.jsp index e8e770c9e76..d0f9e5d1813 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/webapp/password-reset-complete.jsp +++ b/identity-apps-core/apps/recovery-portal/src/main/webapp/password-reset-complete.jsp @@ -44,6 +44,7 @@ <%@ page import="java.util.HashMap" %> <%@ page import="java.util.List" %> <%@ page import="java.util.Map" %> +<%@ page import="org.wso2.carbon.identity.core.util.IdentityUtil" %> <%@ page import="javax.servlet.http.Cookie" %> <%@ page import="java.util.Base64" %> <%@ page import="org.wso2.carbon.core.util.SignatureUtil" %> @@ -226,7 +227,7 @@ JSONObject cookieValueInJson = new JSONObject(); cookieValueInJson.put("content", content); - String signature = Base64.getEncoder().encodeToString(SignatureUtil.doSignature(content)); + String signature = Base64.getEncoder().encodeToString(IdentityUtil.doSignature(content, tenantDomain)); cookieValueInJson.put("signature", signature); String cookieValue = Base64.getEncoder().encodeToString(cookieValueInJson.toString().getBytes()); diff --git a/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-process.jsp b/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-process.jsp index 189d487f494..e4bbb42afa3 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-process.jsp +++ b/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-process.jsp @@ -22,7 +22,6 @@ <%@ page import="org.apache.commons.lang.StringUtils" %> <%@ page import="org.owasp.encoder.Encode" %> <%@ page import="org.wso2.carbon.core.SameSiteCookie" %> -<%@ page import="org.wso2.carbon.core.util.SignatureUtil" %> <%@ page import="org.wso2.carbon.identity.core.ServiceURLBuilder" %> <%@ page import="org.wso2.carbon.identity.mgt.constants.SelfRegistrationStatusCodes" %> <%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.IdentityManagementEndpointConstants" %> @@ -376,7 +375,7 @@ JSONObject cookieValueInJson = new JSONObject(); cookieValueInJson.put("content", content); - String signature = Base64.getEncoder().encodeToString(SignatureUtil.doSignature(content)); + String signature = Base64.getEncoder().encodeToString(IdentityUtil.doSignature(content, user.getTenantDomain())); cookieValueInJson.put("signature", signature); String cookieValue = Base64.getEncoder().encodeToString(cookieValueInJson.toString().getBytes()); diff --git a/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-with-verification-confirm.jsp b/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-with-verification-confirm.jsp index 7734a3a71c2..b1c50932734 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-with-verification-confirm.jsp +++ b/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-with-verification-confirm.jsp @@ -38,7 +38,7 @@ <%@ page import="javax.ws.rs.HttpMethod" %> <%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.model.User" %> <%@ page import="org.wso2.carbon.identity.recovery.util.Utils" %> -<%@ page import="org.wso2.carbon.core.util.SignatureUtil" %> +<%@ page import="org.wso2.carbon.identity.core.util.IdentityUtil" %> <%@ page import="javax.servlet.http.Cookie" %> <%@ page import="java.util.Base64" %> <%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.PreferenceRetrievalClientException" %> @@ -162,7 +162,7 @@ JSONObject cookieValueInJson = new JSONObject(); cookieValueInJson.put("content", content); - String signature = Base64.getEncoder().encodeToString(SignatureUtil.doSignature(content)); + String signature = Base64.getEncoder().encodeToString(IdentityUtil.doSignature(content, user.getTenantDomain()); cookieValueInJson.put("signature", signature); String cookieValue = Base64.getEncoder().encodeToString(cookieValueInJson.toString().getBytes());