Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2131

External DTD files are accessed without a privileged block when Derby parses XML values that reference such DTDs.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2.1.6, 10.2.2.0, 10.3.1.4
    • Fix Version/s: 10.2.2.0, 10.3.1.4
    • Component/s: SQL
    • Labels:
      None

      Description

      The Derby XMLPARSE operator ultimately makes a call to an external JAXP parser (ex. Xerces or Crimson) to parse an XML value. If the XML value that is being parsed references an external DTD, then the JAXP parser will need to read the DTD file to complete parsing. However, the current code in SqlXmlUtil.java does not use a privileged block when it calls out to the JAXP parser. As a result, when a user who is running with a security manager tries to insert a document that references an external DTD, the call to XMLPARSE will fail with a security exception--even if the JAXP parser has the required "read" permissions.

        Attachments

        1. d2131_10_2.patch
          2 kB
          A B
        2. d2131_rewrite_v2.patch
          3 kB
          A B
        3. d2131_rewrite_v1.patch
          3 kB
          A B
        4. d2131_v1.patch
          2 kB
          A B

          Issue Links

            Activity

              People

              • Assignee:
                army A B
                Reporter:
                army A B
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: