jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-2709) Missing XPath escape in query.jsp
Date Thu, 12 Aug 2010 10:22:15 GMT
Missing XPath escape in query.jsp

                 Key: JCR-2709
                 URL: https://issues.apache.org/jira/browse/JCR-2709
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-webapp
    Affects Versions: 2.1.1
            Reporter: Jukka Zitting
            Priority: Minor
             Fix For: 2.2.0

As reported by Canberk Bolat of ADEO Security in a private communication, there search.jsp
script in jackrabbit-webapp is missing an escape when it injects the path of a "related:"
query into the constructed XPath statement. Further analysis showed that this issue has no
security implications, so we can treat this as a normal bug report.

String q = request.getParameter("q");
      if (q != null && q.length() > 0) {
           String stmt;
           if (q.startsWith("related:")) {
               String path = q.substring("related:".length());
               stmt = "//element(*, nt:file)[rep:similar(jcr:content,
'" + path + "/jcr:content')]/rep:excerpt(.) order by @jcr:score
               queryTerms = "similar to <b>" +
Text.encodeIllegalXMLCharacters(path) + "</b>";

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message