Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-2116

Bad conversion of DataSource password containing special characters.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.7.2
    • Fix Version/s: None
    • Component/s: configuration
    • Labels:
      None

      Description

      In org.apache.openejb.assembler.classic.Assembler:

      final InputStream is = new ByteArrayInputStream(serviceInfo.properties.getProperty("Definition").getBytes());
      final Properties p = new SuperProperties();
      IO.readProperties(is, p);

      The string is first converted to a byte array in the default encoding (e.g. UTF-8) but IO.readProperties expects the stream in ISO 8859-1. So it would be wise to use getBytes("ISO-8859-1").

      As a workaround one may escape the special characters using \u....

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                romain.manni-bucau Romain Manni-Bucau
                Reporter:
                bodop Bodo Pfelzer
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: