Initial attempt to fix CONNECTORS-1597
git-svn-id: https://svn.apache.org/repos/asf/manifoldcf/trunk@1856508 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/crawler-ui/src/main/webapp/editauthority.jsp b/framework/crawler-ui/src/main/webapp/editauthority.jsp
index 848fdd2..692ae20 100644
--- a/framework/crawler-ui/src/main/webapp/editauthority.jsp
+++ b/framework/crawler-ui/src/main/webapp/editauthority.jsp
@@ -130,7 +130,7 @@
String title = null;
if (description.length() > 0)
{
- title = Messages.getBodyString(pageContext.getRequest().getLocale(), "editauthority.EditAuthority") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description);
+ title = Messages.getBodyString(pageContext.getRequest().getLocale(), "editauthority.EditAuthority") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(description);
}
else
{
diff --git a/framework/crawler-ui/src/main/webapp/editconnection.jsp b/framework/crawler-ui/src/main/webapp/editconnection.jsp
index 16a5392..a3b6f80 100644
--- a/framework/crawler-ui/src/main/webapp/editconnection.jsp
+++ b/framework/crawler-ui/src/main/webapp/editconnection.jsp
@@ -119,7 +119,7 @@
$.ManifoldCF.setTitle(
'<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "editconnection.ApacheManifoldCFEditConnection")%>',
- '<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "editconnection.EditRepositoryConnection")%>',
+ '<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "editconnection.EditRepositoryConnection") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(connectionName) %>',
'repositories'
);
diff --git a/framework/crawler-ui/src/main/webapp/editgroup.jsp b/framework/crawler-ui/src/main/webapp/editgroup.jsp
index 0b8f7eb..d083cec 100644
--- a/framework/crawler-ui/src/main/webapp/editgroup.jsp
+++ b/framework/crawler-ui/src/main/webapp/editgroup.jsp
@@ -87,7 +87,7 @@
String heading = null;
if (description.length() > 0)
{
- heading = Messages.getBodyString(pageContext.getRequest().getLocale(),"editgroup.EditGroup") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description);
+ heading = Messages.getBodyString(pageContext.getRequest().getLocale(),"editgroup.EditGroup") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(description);
}
else
{
diff --git a/framework/crawler-ui/src/main/webapp/editjob.jsp b/framework/crawler-ui/src/main/webapp/editjob.jsp
index 5c7a841..01d8716 100644
--- a/framework/crawler-ui/src/main/webapp/editjob.jsp
+++ b/framework/crawler-ui/src/main/webapp/editjob.jsp
@@ -306,7 +306,7 @@
String title = null;
if (description.length() > 0)
{
- title = Messages.getBodyString(pageContext.getRequest().getLocale(),"editjob.EditJob") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description);
+ title = Messages.getBodyString(pageContext.getRequest().getLocale(),"editjob.EditJob") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(description);
}
else
{
diff --git a/framework/crawler-ui/src/main/webapp/editmapper.jsp b/framework/crawler-ui/src/main/webapp/editmapper.jsp
index cc7eb77..8e6029d 100644
--- a/framework/crawler-ui/src/main/webapp/editmapper.jsp
+++ b/framework/crawler-ui/src/main/webapp/editmapper.jsp
@@ -112,7 +112,7 @@
String title = null;
if (description.length() > 0)
{
- title = Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.EditMapping") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description);
+ title = Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.EditMapping") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(description);
}
else
{
diff --git a/framework/crawler-ui/src/main/webapp/editnotification.jsp b/framework/crawler-ui/src/main/webapp/editnotification.jsp
index daf72a8..31b6778 100644
--- a/framework/crawler-ui/src/main/webapp/editnotification.jsp
+++ b/framework/crawler-ui/src/main/webapp/editnotification.jsp
@@ -102,7 +102,7 @@
String title = null;
if (description.length() > 0)
{
- title = Messages.getBodyString(pageContext.getRequest().getLocale(),"editnotification.EditNotificationConnection") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description);
+ title = Messages.getBodyString(pageContext.getRequest().getLocale(),"editnotification.EditNotificationConnection") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(description);
}
else
{
diff --git a/framework/crawler-ui/src/main/webapp/editoutput.jsp b/framework/crawler-ui/src/main/webapp/editoutput.jsp
index 366e80f..2776e44 100644
--- a/framework/crawler-ui/src/main/webapp/editoutput.jsp
+++ b/framework/crawler-ui/src/main/webapp/editoutput.jsp
@@ -102,7 +102,7 @@
if (description.length() > 0)
{
heading = Messages.getBodyString(pageContext.getRequest()
- .getLocale(),"editoutput.EditOutputConnection") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description);
+ .getLocale(),"editoutput.EditOutputConnection") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(description);
}
else
{
diff --git a/framework/crawler-ui/src/main/webapp/edittransformation.jsp b/framework/crawler-ui/src/main/webapp/edittransformation.jsp
index e583ce2..e2800e8 100644
--- a/framework/crawler-ui/src/main/webapp/edittransformation.jsp
+++ b/framework/crawler-ui/src/main/webapp/edittransformation.jsp
@@ -103,7 +103,7 @@
String heading = null;
if (description.length() > 0)
{
- heading = Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.EditTransformationConnection") + " " + org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description);
+ heading = Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.EditTransformationConnection") + " " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(description);
}
else
{
diff --git a/framework/crawler-ui/src/main/webapp/login.jsp b/framework/crawler-ui/src/main/webapp/login.jsp
index 384f25a..e09ebdf 100644
--- a/framework/crawler-ui/src/main/webapp/login.jsp
+++ b/framework/crawler-ui/src/main/webapp/login.jsp
@@ -1,3 +1,4 @@
+<%@ page import="org.apache.manifoldcf.core.util.URLEncoder" %>
<% response.setHeader("Pragma","No-cache");
response.setDateHeader("Expires",0);
response.setHeader("Cache-Control", "no-cache");
@@ -68,12 +69,13 @@
<div class="login-box-body">
<p class="login-box-msg">Sign in to start your session</p>
- <form class="standardform" name="loginform" action="setupAdminProfile.jsp" method="POST">
+ <form class="standardform" name="loginform" autocomplete="off" action="setupAdminProfile.jsp" method="POST">
+ <input autocomplete="false" name="hidden" type="text" style="display:none;">
<%
if (request.getParameter("nextUrl") != null)
{
%>
- <input type="hidden" name="nextUrl" value="<%=request.getParameter("nextUrl")%>">
+ <input type="hidden" name="nextUrl" value="<%= URLEncoder.encode(request.getParameter("nextUrl"))%>">
<%
}
%>
diff --git a/framework/crawler-ui/src/main/webapp/viewauthority.jsp b/framework/crawler-ui/src/main/webapp/viewauthority.jsp
index 24d6395..72fcd1a 100644
--- a/framework/crawler-ui/src/main/webapp/viewauthority.jsp
+++ b/framework/crawler-ui/src/main/webapp/viewauthority.jsp
@@ -96,7 +96,7 @@
<!--
$.ManifoldCF.setTitle(
'<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewauthority.ApacheManifoldCFViewAuthorityConnectionStatus")%>',
- '<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.ViewAuthorityConnectionStatus") + " - " + connectionName %>',
+ '<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.ViewAuthorityConnectionStatus") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(connectionName) %>',
'authorities'
);
function Delete(connectionName)
diff --git a/framework/crawler-ui/src/main/webapp/viewconnection.jsp b/framework/crawler-ui/src/main/webapp/viewconnection.jsp
index 073e0f5..3f5573f 100644
--- a/framework/crawler-ui/src/main/webapp/viewconnection.jsp
+++ b/framework/crawler-ui/src/main/webapp/viewconnection.jsp
@@ -92,7 +92,7 @@
$.ManifoldCF.setTitle(
'<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewconnection.ApacheManifoldCFViewRepositoryConnectionStatus")%>',
- '<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewconnection.ViewRepositoryConnectionStatus")%>',
+ '<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewconnection.ViewRepositoryConnectionStatus") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(connectionName) %>',
'repositories'
);
diff --git a/framework/crawler-ui/src/main/webapp/viewgroup.jsp b/framework/crawler-ui/src/main/webapp/viewgroup.jsp
index 628b096..3fb1f37 100644
--- a/framework/crawler-ui/src/main/webapp/viewgroup.jsp
+++ b/framework/crawler-ui/src/main/webapp/viewgroup.jsp
@@ -53,7 +53,7 @@
$.ManifoldCF.setTitle(
'<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewgroup.ApacheManifoldCFViewGroup")%>',
- '<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewgroup.ViewAuthorityGroup") + " - " + groupName %>',
+ '<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewgroup.ViewAuthorityGroup") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(groupName) %>',
'authorities'
);
diff --git a/framework/crawler-ui/src/main/webapp/viewjob.jsp b/framework/crawler-ui/src/main/webapp/viewjob.jsp
index b4ceda1..0ed0e56 100644
--- a/framework/crawler-ui/src/main/webapp/viewjob.jsp
+++ b/framework/crawler-ui/src/main/webapp/viewjob.jsp
@@ -121,7 +121,7 @@
$.ManifoldCF.setTitle(
'<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewjob.ApacheManifoldCFViewJob")%>',
- '<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewjob.ViewAJob")%>',
+ '<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewjob.ViewAJob") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(connectionName) %>',
'jobs'
);
diff --git a/framework/crawler-ui/src/main/webapp/viewmapper.jsp b/framework/crawler-ui/src/main/webapp/viewmapper.jsp
index c084d7e..e288108 100644
--- a/framework/crawler-ui/src/main/webapp/viewmapper.jsp
+++ b/framework/crawler-ui/src/main/webapp/viewmapper.jsp
@@ -87,7 +87,7 @@
<!--
$.ManifoldCF.setTitle(
'<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewmapper.ApacheManifoldCFViewMappingConnectionStatus")%>',
- '<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewmapper.ViewMappingConnectionStatus") + " - " + connectionName %>',
+ '<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewmapper.ViewMappingConnectionStatus") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(connectionName) %>',
'authorities'
);
diff --git a/framework/crawler-ui/src/main/webapp/viewnotification.jsp b/framework/crawler-ui/src/main/webapp/viewnotification.jsp
index bffb190..7eaae05 100644
--- a/framework/crawler-ui/src/main/webapp/viewnotification.jsp
+++ b/framework/crawler-ui/src/main/webapp/viewnotification.jsp
@@ -89,7 +89,7 @@
<!--
$.ManifoldCF.setTitle(
'<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewnotification.ApacheManifoldCFViewNotificationConnectionStatus")%>',
- '<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewnotification.ViewNotificationConnectionStatus")%>',
+ '<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewnotification.ViewNotificationConnectionStatus") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(connectionName) %>',
'repositories'
);
function Delete(connectionName)
diff --git a/framework/crawler-ui/src/main/webapp/viewoutput.jsp b/framework/crawler-ui/src/main/webapp/viewoutput.jsp
index b5b994e..224e18e 100644
--- a/framework/crawler-ui/src/main/webapp/viewoutput.jsp
+++ b/framework/crawler-ui/src/main/webapp/viewoutput.jsp
@@ -89,7 +89,7 @@
<!--
$.ManifoldCF.setTitle(
'<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewoutput.ApacheManifoldCFViewOutputConnectionStatus")%>',
- '<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewoutput.ViewOutputConnectionStatus") + " - " + connectionName %>',
+ '<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewoutput.ViewOutputConnectionStatus") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(connectionName) %>',
'outputs'
);
diff --git a/framework/crawler-ui/src/main/webapp/viewtransformation.jsp b/framework/crawler-ui/src/main/webapp/viewtransformation.jsp
index 99bec5c..de67ad9 100644
--- a/framework/crawler-ui/src/main/webapp/viewtransformation.jsp
+++ b/framework/crawler-ui/src/main/webapp/viewtransformation.jsp
@@ -90,7 +90,7 @@
$.ManifoldCF.setTitle(
'<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewtransformation.ApacheManifoldCFViewTransformationConnectionStatus")%>',
- '<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewtransformation.ViewTransformationConnectionStatus") + " - " + connectionName%>',
+ '<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "viewtransformation.ViewTransformationConnectionStatus") + " - " + org.apache.manifoldcf.ui.util.Encoder.bodyJavascriptEscape(connectionName) %>',
'outputs'
);