Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert callback validation in self-registration-username-request.jsp #7270

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/short-grapes-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/identity-apps-core": major
---

Revert callback validation logic
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
<%@ page import="org.wso2.carbon.identity.application.authentication.endpoint.util.AuthenticationEndpointUtil" %>
<%@ page import="static org.wso2.carbon.identity.application.authentication.endpoint.util.Constants.STATUS" %>
<%@ page import="static org.wso2.carbon.identity.application.authentication.endpoint.util.Constants.STATUS_MSG" %>
<%@ page import="org.wso2.carbon.identity.recovery.IdentityRecoveryConstants" %>
<%@ page import="org.wso2.carbon.identity.recovery.util.Utils" %>
<%@ page import="org.wso2.carbon.identity.base.IdentityRuntimeException" %>
<%@ page import="org.wso2.carbon.identity.application.authentication.endpoint.util.Constants" %>
<%@ page import="org.wso2.carbon.identity.captcha.util.CaptchaUtil" %>
<%@ page import="org.wso2.carbon.identity.core.URLBuilderException" %>
Expand Down Expand Up @@ -307,22 +304,6 @@
consentPurposeGroupName = "JIT";
}

try {
if (StringUtils.isNotBlank(callback) && !Utils.validateCallbackURL(callback, tenantDomain,
IdentityRecoveryConstants.ConnectorConfig.SELF_REGISTRATION_CALLBACK_REGEX)) {
request.setAttribute("error", true);
request.setAttribute("errorMsg", IdentityManagementEndpointUtil.i18n(recoveryResourceBundle,
"Callback.url.format.invalid"));
request.getRequestDispatcher("error.jsp").forward(request, response);
return;
}
} catch (IdentityRuntimeException e) {
request.setAttribute("error", true);
request.setAttribute("errorMsg", e.getMessage());
request.getRequestDispatcher("error.jsp").forward(request, response);
return;
}

if (StringUtils.isBlank(callback) || StringUtils.equalsIgnoreCase(callback, "null")) {
callback = Encode.forHtmlAttribute(IdentityManagementEndpointUtil.getUserPortalUrl(
application.getInitParameter(IdentityManagementEndpointConstants.ConfigConstants.USER_PORTAL_URL), tenantDomain));
Expand Down Expand Up @@ -762,7 +743,7 @@
<div class="field external-link-container text-small">
<%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle,
"Already.have.an.account")%>
<a href="<%= StringEscapeUtils.escapeHtml4(backToUrl) %>">
<a href="<%=backToUrl%>">
<%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, "Sign.in")%>
</a>
</div>
Expand Down
Loading