Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,16 @@ protected static String getForcedSignOutRequestedURI(String requestedURI,
protected static int handleLoginPageRequest(String requestedURI, HttpServletRequest request,
HttpServletResponse response, boolean authenticated, String context, String indexPageURL)
throws IOException {
boolean isTryIt = requestedURI.indexOf("admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp") > -1;
boolean isFileDownload = requestedURI.endsWith("/filedownload");
if (requestedURI.indexOf("login.jsp") > -1
|| requestedURI.indexOf("login_ajaxprocessor.jsp") > -1
|| requestedURI.indexOf("admin/layout/template.jsp") > -1
|| requestedURI.endsWith("/filedownload") || requestedURI.endsWith("/fileupload")
|| isFileDownload
|| requestedURI.endsWith("/fileupload")
|| requestedURI.indexOf("/fileupload/") > -1
|| requestedURI.indexOf("login_action.jsp") > -1
|| requestedURI.indexOf("admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp") > -1
|| isTryIt
|| requestedURI.indexOf("tryit/JAXRSRequestXSSproxy_ajaxprocessor.jsp") > -1) {

if ((requestedURI.indexOf("login.jsp") > -1
Expand All @@ -584,6 +587,11 @@ protected static int handleLoginPageRequest(String requestedURI, HttpServletRequ
// redirect relative to the servlet container root
response.sendRedirect(context + "/carbon/admin/index.jsp");
return RETURN_FALSE;
} else if ((isTryIt || isFileDownload) && !authenticated) {
if (isFileDownload) {
response.sendRedirect(context + "/carbon/admin/index.jsp");
}
return RETURN_FALSE;
} else if (requestedURI.indexOf("login_action.jsp") > -1 && !authenticated) {
// User is not yet authenticated and now trying to get authenticated
// do nothing, leave for authentication at the end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
return documentBuilder;
}
%><%
if ("true".equalsIgnoreCase(System.getProperty("tryItFunctionalityDisabled"))) {
return;
}
boolean useWSS = false;
String policy = "<wsp:Policy wsu:Id=\"UTOverTransport\"\n" +
" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\"\n" +
Expand Down