Commit 35355cdf authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed security vulnerabilities. JM-1506

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10936 b35dd754-fafc-0310-a699-88a17e54d16e
parent bb0f97bd
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
&& !request.getParameter("search").trim().equals("")) && !request.getParameter("search").trim().equals(""))
{ {
search = request.getParameter("search"); search = request.getParameter("search");
// Santize variables to prevent vulnerabilities
search = StringUtils.escapeHTMLTags(search);
// Use the search terms to get the list of groups and group count. // Use the search terms to get the list of groups and group count.
groups = webManager.getGroupManager().search(search, start, range); groups = webManager.getGroupManager().search(search, start, range);
// Get the count as a search for *all* groups. That will let us do pagination even // Get the count as a search for *all* groups. That will let us do pagination even
......
...@@ -87,6 +87,9 @@ ...@@ -87,6 +87,9 @@
numLinesParam = "50"; numLinesParam = "50";
} }
// Santize variables to prevent vulnerabilities
log = StringUtils.escapeHTMLTags(log);
// Other vars // Other vars
File logDir = new File(Log.getLogDirectory()); File logDir = new File(Log.getLogDirectory());
String filename = log + ".log"; String filename = log + ".log";
......
...@@ -130,6 +130,11 @@ ...@@ -130,6 +130,11 @@
return; return;
} }
// Santize variables to prevent vulnerabilities
if (log != null) {
log = StringUtils.escapeHTMLTags(log);
}
debugEnabled = Log.isDebugEnabled(); debugEnabled = Log.isDebugEnabled();
User pageUser = admin.getUser(); User pageUser = admin.getUser();
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<%@ page import="org.xmpp.packet.JID"%><%@ page import="org.xmpp.packet.Presence"%> <%@ page import="org.xmpp.packet.JID"%><%@ page import="org.xmpp.packet.Presence"%>
<%@ page import="java.net.URLEncoder" %> <%@ page import="java.net.URLEncoder" %>
<%@ page import="java.util.Collection" %> <%@ page import="java.util.Collection" %>
<%@ page import="org.jivesoftware.util.StringUtils" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
...@@ -146,7 +147,7 @@ ...@@ -146,7 +147,7 @@
<tr> <tr>
<td class="jive-icon-label"> <td class="jive-icon-label">
<fmt:message key="error.specific_user_not_found"> <fmt:message key="error.specific_user_not_found">
<fmt:param value="<%= username%>" /> <fmt:param value="<%= StringUtils.escapeHTMLTags(username)%>" />
</fmt:message> </fmt:message>
</td></tr> </td></tr>
</tbody> </tbody>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment