XalanJ2
  1. XalanJ2
  2. XALANJ-2435

Use of secure processing feature should disable some output properties

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.1
    • Fix Version/s: 2.7.2
    • Component/s: None
    • Labels:
      None

      Description

      When using the FEATURE_SECURE_PROCESSING ("http://javax.xml.XMLConstants/feature/secure-processing") on a TransformerFactory it seems appropriate that the output properties:

      {http://xml.apache.org/xalan}

      content-handler

      {http://xml.apache.org/xalan}

      entities

      {http://xml.apache.org/xslt}

      content-handler

      {http://xml.apache.org/xslt}

      entities

      should be ignored (see http://xml.apache.org/xalan-j/usagepatterns.html#outputprops)

      These properties can be used to load an arbitrary class or access an arbitrary URL/resource so are problematic when secure processing is desired.

      <xsl:output xalan:content-handler="org.example.BadClass" ...
      <xsl:output xalan:entities="http://example.org/reallyLargeFile.bin" ...

      These features could be used to load a class that had undesirable side-effects or to load a large file and exhaust memory, etc.

      1. TestXslt.java
        3 kB
        Steve Jones

        Activity

        Steve Jones created issue -
        Steve Jones made changes -
        Field Original Value New Value
        Attachment TestXslt.java [ 12376885 ]
        Mark Thomas made changes -
        Workflow jira [ 12424842 ] Default workflow, editable Closed status [ 12570655 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12570655 ] jira [ 12594667 ]
        Gary Gregory made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Gary Gregory [ garydgregory ]
        Fix Version/s 2.7.2 [ 12323150 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Gary Gregory
            Reporter:
            Steve Jones
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development