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

OF-1955: Fix XSS issues identified by CSW #1561

Merged
merged 1 commit into from
Dec 31, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected void doGet(final HttpServletRequest request, final HttpServletResponse
.map(cache -> (Cache<?, ?>) cache);

if (!optionalCache.isPresent()) {
request.setAttribute("warningMessage", LocaleUtils.getLocalizedString("system.cache-details.cache_not_found", Collections.singletonList(cacheName)));
request.setAttribute("warningMessage", LocaleUtils.getLocalizedString("system.cache-details.cache_not_found", Collections.singletonList(StringUtils.escapeHTMLTags(cacheName))));
}

final boolean secretKey = optionalCache.map(Cache::isKeySecret).orElse(Boolean.FALSE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<label for="alias"><fmt:message key="ssl.signing-request.alias"/></label>
</td>
<td width="99%">
<input type="text" size="30" maxlength="100" name="alias" id="alias" value="${param.alias}">
<input type="text" size="30" maxlength="100" name="alias" id="alias" value="<c:out value='${param.alias}'/>"">
</td>
</tr>
<tr valign="top">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@

<form action="security-certificate-details.jsp">
<input type="hidden" name="connectionType" value="${connectionType}"/>
<input type="hidden" name="isTrustStore" value="${param.isTrustStore}"/>
<input type="hidden" name="isTrustStore" value="<c:out value='${param.isTrustStore}'/>"/>
<div style="text-align: center;">
<input type="submit" name="back" value="<fmt:message key="session.details.back_button"/>">
</div>
Expand Down
3 changes: 2 additions & 1 deletion xmppserver/src/main/webapp/system-cache-details.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<jsp:useBean scope="request" id="search" type="org.jivesoftware.admin.servlet.SystemCacheDetailsServlet.Search"/>
<%@ page contentType="text/html; charset=UTF-8" %>
<head>
<title><fmt:message key="system.cache-details.title"><fmt:param value="${cacheName}"/></fmt:message></title>
<fmt:message key="system.cache-details.title" var="title"><fmt:param value="${cacheName}"/></fmt:message>
<title><c:out value="${title}"/></title>
<meta name="pageID" content="system-cache"/>
<style type="text/css">
img.clickable {
Expand Down
2 changes: 1 addition & 1 deletion xmppserver/src/main/webapp/user-groups.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
<td align="right" valign="bottom"><fmt:message
key="group.summary.search" />: <input type="text" size="30"
maxlength="150" name="search"
value="<%=((search!=null) ? search : "")%>"></td>
value="<c:out value='${param.search}'/>"></td>
</tr>
</table>
<input type="hidden" name="username"
Expand Down