Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-10430

Add fix for POSIX newline in password files

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • Commons Crypto 1.1.0
    • Commons
    • None

    Description

      POSIX recommends (shall) to terminate lines in regular text files with newline character (\n).

      Tools on UNIX/POSIX systems therefore add a newline character by default to terminate lines and also expect a newline character:

      beat:resources olli$ wc -l password.ascii85
             0 password.ascii85
      beat:resources olli$ cat password.ascii85
      +AQ?aDes!'DBMkrCi:FE6q\sOn=Pbmn=PK8n=PK?beat:resources olli$ wc -l password.ascii85_newline
             1 password.ascii85_newline
      beat:resources olli$ cat password.ascii85_newline
      +AQ?aDes!'DBMkrCi:FE6q\sOn=Pbmn=PK8n=PK?
      beat:resources olli$
      
      • wc reports zero lines for password.ascii85
      • output for password.ascii85 on shell from cat looks flawed

      The extra newline character leads to an error (SLING-10415) with misleading message:

      org.jasypt.exceptions.EncryptionInitializationException: java.security.spec.InvalidKeySpecException: Password is not ASCII
      	at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:773)
      

      Attachments

        Issue Links

          Activity

            People

              olli Oliver Lietz
              olli Oliver Lietz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: