From 33d31a018f8b06489560bcb8ba537853ab66f66a Mon Sep 17 00:00:00 2001 From: Kayathiri Mahendrakumaran Date: Mon, 23 Sep 2024 16:18:18 +0530 Subject: [PATCH 1/3] Fix username with special characters --- .../apps/recovery-portal/src/main/webapp/recovery.jsp | 1 + 1 file changed, 1 insertion(+) diff --git a/identity-apps-core/apps/recovery-portal/src/main/webapp/recovery.jsp b/identity-apps-core/apps/recovery-portal/src/main/webapp/recovery.jsp index d0fd508e4d2..785814cdcc5 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/webapp/recovery.jsp +++ b/identity-apps-core/apps/recovery-portal/src/main/webapp/recovery.jsp @@ -80,6 +80,7 @@ if (StringUtils.isNotBlank(username)) { username = (String) request.getAttribute("resolvedUsername"); + username = StringEscapeUtils.unescapeJava(username); } // Password recovery parameters From 72d1ec4bf2ff6c81cb7e09fa35d7d113dcbce22b Mon Sep 17 00:00:00 2001 From: Kayathiri Mahendrakumaran Date: Mon, 23 Sep 2024 16:26:16 +0530 Subject: [PATCH 2/3] =?UTF-8?q?Add=20changeset=20=F0=9F=A6=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/little-snails-pretend.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/little-snails-pretend.md diff --git a/.changeset/little-snails-pretend.md b/.changeset/little-snails-pretend.md new file mode 100644 index 00000000000..b718946d774 --- /dev/null +++ b/.changeset/little-snails-pretend.md @@ -0,0 +1,5 @@ +--- +"@wso2is/identity-apps-core": patch +--- + +Fix username with special characters by removing escape characters From efebac131acdf38d6af54d21bdf4cf88fd11e824 Mon Sep 17 00:00:00 2001 From: Kayathiri Mahendrakumaran Date: Tue, 24 Sep 2024 17:01:03 +0530 Subject: [PATCH 3/3] Fix username unescaping in challenge question flow --- .../src/main/webapp/challenge-question-request.jsp | 3 +++ .../apps/recovery-portal/src/main/webapp/recovery.jsp | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/identity-apps-core/apps/recovery-portal/src/main/webapp/challenge-question-request.jsp b/identity-apps-core/apps/recovery-portal/src/main/webapp/challenge-question-request.jsp index 17152bb1093..442f42c0e30 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/webapp/challenge-question-request.jsp +++ b/identity-apps-core/apps/recovery-portal/src/main/webapp/challenge-question-request.jsp @@ -35,6 +35,9 @@ <% String username = IdentityManagementEndpointUtil.getStringValue(request.getAttribute("username")); + if (StringUtils.isNotBlank(username)) { + username = StringEscapeUtils.unescapeJava(username); + } RetryError errorResponse = (RetryError) request.getAttribute("errorResponse"); if (errorResponse != null) { diff --git a/identity-apps-core/apps/recovery-portal/src/main/webapp/recovery.jsp b/identity-apps-core/apps/recovery-portal/src/main/webapp/recovery.jsp index 785814cdcc5..d0fd508e4d2 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/webapp/recovery.jsp +++ b/identity-apps-core/apps/recovery-portal/src/main/webapp/recovery.jsp @@ -80,7 +80,6 @@ if (StringUtils.isNotBlank(username)) { username = (String) request.getAttribute("resolvedUsername"); - username = StringEscapeUtils.unescapeJava(username); } // Password recovery parameters