Skip to content

Commit 910e1aa

Browse files
committed
Add review suggestions
1 parent 7638646 commit 910e1aa

File tree

1 file changed

+6
-7
lines changed
  • identity-apps-core/apps/authentication-portal/src/main/webapp

1 file changed

+6
-7
lines changed

identity-apps-core/apps/authentication-portal/src/main/webapp/basicauth.jsp

+6-7
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@
239239
%>
240240

241241
<%
242-
Boolean isAdminBannerAllowedInSP = CONSOLE.equals(Encode.forJava(request.getParameter("sp")));
242+
Boolean isAdminBannerAllowedInSP = CONSOLE.equals(sp);
243243
Boolean isAdminAdvisoryBannerEnabledInTenant = false;
244244
String adminAdvisoryBannerContentOfTenant = "";
245245
@@ -302,7 +302,7 @@
302302
String resendUsername = request.getParameter("resend_username");
303303
String spProp = "sp";
304304
String spIdProp = "spId";
305-
String sp = request.getParameter("sp");
305+
String sp = Encode.forJava(request.getParameter("sp"));
306306
String spId = "";
307307
308308
try {
@@ -567,8 +567,7 @@
567567
String urlWithoutEncoding = null;
568568
try {
569569
ApplicationDataRetrievalClient applicationDataRetrievalClient = new ApplicationDataRetrievalClient();
570-
urlWithoutEncoding = applicationDataRetrievalClient.getApplicationAccessURL(tenantDomain,
571-
request.getParameter("sp"));
570+
urlWithoutEncoding = applicationDataRetrievalClient.getApplicationAccessURL(tenantDomain, sp);
572571
} catch (ApplicationDataRetrievalClientException e) {
573572
//ignored and fallback to login page url
574573
}
@@ -578,11 +577,11 @@
578577
String serverName = request.getServerName();
579578
int serverPort = request.getServerPort();
580579
String uri = (String) request.getAttribute(JAVAX_SERVLET_FORWARD_REQUEST_URI);
581-
String prmstr = URLDecoder.decode(((String) request.getAttribute(JAVAX_SERVLET_FORWARD_QUERY_STRING)), UTF_8);
580+
String paramStr = URLDecoder.decode(((String) request.getAttribute(JAVAX_SERVLET_FORWARD_QUERY_STRING)), UTF_8);
582581
if ((scheme == "http" && serverPort == HttpURL.DEFAULT_PORT) || (scheme == "https" && serverPort == HttpsURL.DEFAULT_PORT)) {
583-
urlWithoutEncoding = scheme + "://" + serverName + uri + "?" + prmstr;
582+
urlWithoutEncoding = scheme + "://" + serverName + uri + "?" + paramStr;
584583
} else {
585-
urlWithoutEncoding = scheme + "://" + serverName + ":" + serverPort + uri + "?" + prmstr;
584+
urlWithoutEncoding = scheme + "://" + serverName + ":" + serverPort + uri + "?" + paramStr;
586585
}
587586
}
588587
urlWithoutEncoding = IdentityManagementEndpointUtil.replaceUserTenantHintPlaceholder(

0 commit comments

Comments
 (0)