cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Kwakkel (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-6216) No output sanitizing in FormattedServiceListWriter
Date Mon, 26 Jan 2015 19:14:36 GMT

    [ https://issues.apache.org/jira/browse/CXF-6216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14292259#comment-14292259
] 

Donald Kwakkel commented on CXF-6216:
-------------------------------------

Thanks for taking this serious.

In BaseUrlHelper.getBaseURL there is an option that the result of getRequestURL is returned,
in case the if condition is false:
{code}
public static String getBaseURL(HttpServletRequest request) {
		String reqPrefix = request.getRequestURL().toString();
		String pathInfo = (request.getPathInfo() == null) ? "" : request.getPathInfo();

		if (!("/".equals(pathInfo)) || reqPrefix.endsWith("/")) {
..
		}
		return reqPrefix;
	}
{code}
Did you consider this?

> No output sanitizing in FormattedServiceListWriter 
> ---------------------------------------------------
>
>                 Key: CXF-6216
>                 URL: https://issues.apache.org/jira/browse/CXF-6216
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.0.1
>            Reporter: Donald Kwakkel
>
> No output sanitizing is done, which makes the code vulnerable for injection. I do not
have a specific use case, but it is good habit to do. Maybe you can use the OWASP Sanitizer:
https://www.owasp.org/index.php/OWASP_Java_HTML_Sanitizer_Project
> One example from the file: 
>         writer.write("<span class=\"field\">Endpoint address:</span> " +
"<span class=\"value\">"
>                      + absoluteURL + "</span>");



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message