Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8816

Deflater and Inflater initialized with different 'nowrap' value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.10, 3.5.5, 4.0.0
    • 3.6.0, 4.0.1, 3.5.6, 3.4.11
    • None
    • None
    • Unknown

    Description

      As for now Deflater and Inflater initialized with different 'nowrap' value. As result we are getting the folowing Exeption:
      ```
      java.lang.SecurityException: java.util.zip.DataFormatException: invalid stored block lengths
              at org.apache.cxf.rt.security.crypto.CryptoUtils.processBytes(CryptoUtils.java:587)
              at org.apache.cxf.rt.security.crypto.CryptoUtils.decryptBytes(CryptoUtils.java:483)
              at org.apache.cxf.rs.security.jose.jwe.AbstractJweDecryption.doDecrypt(AbstractJweDecryption.java:72)
              at org.apache.cxf.rs.security.jose.jwe.AbstractJweDecryption.decrypt(AbstractJweDecryption.java:57)
              at org.apache.cxf.rs.security.jose.jwe.JweJsonConsumer.decryptWith(JweJsonConsumer.java:64)

      ```

      This PR will fix the Jwe Compression by setting the 'nowrap' parameter for both Deflater and Inflater to 'true' (RAW DEF) as specified in the RFC1951.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              reta Andriy Redko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: