Derby
  1. Derby
  2. DERBY-5357

SQLJ.INSTALL_JAR shouldn't use identifier as file name

    Details

    • Urgency:
      Normal
    • Bug behavior facts:
      Security

      Description

      When installing a jar file with the SQLJ.INSTALL_JAR procedure, it will copy the jar file to a subdirectory of the database directory. The name of the stored jar file is based on the qualified name specified by the second parameter in the procedure, and becomes something like: <DBDIR>/jar/<SCHEMA>/<JAR_NAME>.jar.<VERSION>

      This naming scheme is problematic because the qualified name of the jar file is an SQL identifier and may contain any characters, also characters with special meaning to the underlying file system.

      One example is this call:

      ij> call sqlj.install_jar('/path/to/toursdb.jar', 'APP."../../../x/jar"', 0);
      0 rows inserted/updated/deleted

      On Unix-like systems, this will install the jar in a subdirectory of the database directory's parent directory, which is clearly unfortunate as the database directory should be self-contained (an assumption used when taking backup of a database using operating system commands, or when moving the database to another location).

      There's probably also a possibility that INSTALL_JAR fails if the identifier contains a character that's not allowed in file names on the platform.

      It would be better if the jars were stored in a file whose name is independent of the identifier used, so that any valid SQL identifier could be used to name a jar file in the database without causing problems.

      1. derby-5357-with-tests-4.stat
        0.8 kB
        Dag H. Wanvik
      2. derby-5357-with-tests-4.diff
        46 kB
        Dag H. Wanvik
      3. derby-5357-with-tests-3.stat
        0.8 kB
        Dag H. Wanvik
      4. derby-5357-with-tests-3.diff
        39 kB
        Dag H. Wanvik
      5. derby-5357-with-tests-2.stat
        0.8 kB
        Dag H. Wanvik
      6. derby-5357-with-tests-2.diff
        38 kB
        Dag H. Wanvik
      7. derby-5357-with-tests.stat
        0.8 kB
        Dag H. Wanvik
      8. derby-5357-with-tests.diff
        36 kB
        Dag H. Wanvik
      9. derby-5357-2.stat
        0.6 kB
        Dag H. Wanvik
      10. derby-5357-2.diff
        22 kB
        Dag H. Wanvik
      11. derby-5357.stat
        0.1 kB
        Dag H. Wanvik
      12. derby-5357.diff
        2 kB
        Dag H. Wanvik

        Activity

        Knut Anders Hatlen created issue -
        Mamta A. Satoor made changes -
        Field Original Value New Value
        Labels derby_triage10_9
        Urgency Low [ 10053 ]
        Dag H. Wanvik made changes -
        Attachment derby-5357.diff [ 12516773 ]
        Attachment derby-5357.stat [ 12516774 ]
        Dag H. Wanvik made changes -
        Issue & fix info Patch Available [ 10102 ]
        Dag H. Wanvik made changes -
        Bug behavior facts Security [ 10361 ]
        Urgency Low [ 10053 ] Normal [ 10052 ]
        Dag H. Wanvik made changes -
        Assignee Dag H. Wanvik [ dagw ]
        Dag H. Wanvik made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Dag H. Wanvik made changes -
        Attachment derby-5357-2.diff [ 12517094 ]
        Attachment derby-5357-2.stat [ 12517095 ]
        Dag H. Wanvik made changes -
        Attachment derby-5357-with-tests.diff [ 12517513 ]
        Attachment derby-5357-with-tests.stat [ 12517514 ]
        Dag H. Wanvik made changes -
        Attachment derby-5357-with-tests.diff [ 12517513 ]
        Dag H. Wanvik made changes -
        Attachment derby-5357-with-tests.diff [ 12517516 ]
        Dag H. Wanvik made changes -
        Attachment derby-5357-with-tests.diff [ 12517516 ]
        Dag H. Wanvik made changes -
        Attachment derby-5357-with-tests.diff [ 12517518 ]
        Dag H. Wanvik made changes -
        Attachment derby-5357-with-tests-2.diff [ 12518001 ]
        Attachment derby-5357-with-tests-2.stat [ 12518002 ]
        Dag H. Wanvik made changes -
        Attachment derby-5357-with-tests-3.diff [ 12518225 ]
        Attachment derby-5357-with-tests-3.stat [ 12518226 ]
        Dag H. Wanvik made changes -
        Attachment derby-5357-with-tests-4.diff [ 12518487 ]
        Attachment derby-5357-with-tests-4.stat [ 12518488 ]
        Dag H. Wanvik made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Issue & fix info Patch Available [ 10102 ]
        Fix Version/s 10.9.0.0 [ 12316344 ]
        Resolution Fixed [ 1 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Kathey Marsden made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Kathey Marsden made changes -
        Labels derby_triage10_9 derby_backport_reject_10_8 derby_triage10_9
        Kathey Marsden made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gavin made changes -
        Workflow jira [ 12623840 ] Default workflow, editable Closed status [ 12802900 ]

          People

          • Assignee:
            Dag H. Wanvik
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development