ICEpdf
  1. ICEpdf
  2. PDF-868

Encrypted document incorrectly request password

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.1
    • Fix Version/s: 6.1.3
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any

      Description

      The file in question is prompting the user for a password. This doesn't appear to be the correct behavior. Further analysis is needed.

        Activity

        Patrick Corless created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Fix Version/s 6.1.3 [ 13086 ]
        Hide
        Patrick Corless added a comment -

        Took a while to track this one down but the issue was actually due to how we decode hex strings. The user password hash for this document started off with the 4 byte encoded string <FEFF...> which cause our hext string class to treat the string as a 4 byte encoded string instead of 2 byte. I refactored the hexString class to have a raw method so we can get at the 2byte values. There are are many examples of when 4 bytes are valid, this might be just a one off but the spec in this case tells use it should be 2 bytes.

        Show
        Patrick Corless added a comment - Took a while to track this one down but the issue was actually due to how we decode hex strings. The user password hash for this document started off with the 4 byte encoded string <FEFF...> which cause our hext string class to treat the string as a 4 byte encoded string instead of 2 byte. I refactored the hexString class to have a raw method so we can get at the 2byte values. There are are many examples of when 4 bytes are valid, this might be just a one off but the spec in this case tells use it should be 2 bytes.
        Hide
        Patrick Corless added a comment -

        Marking as fixed.

        Show
        Patrick Corless added a comment - Marking as fixed.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49145 Thu Sep 01 10:32:46 MDT 2016 patrick.corless PDF-868 fixed issue with hex string 4 byte code indicator in hex user password.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-6.1.0/icepdf/core/src/org/icepdf/core/pobjects/security/EncryptionDictionary.java
        Commit graph MODIFY /icepdf/branches/icepdf-6.1.0/icepdf/core/src/org/icepdf/core/pobjects/HexStringObject.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49488 Tue Nov 08 10:32:44 MST 2016 patrick.corless PDF-868 fixed issue with hex string 4 byte code indicator in hex user password.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/HexStringObject.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/security/EncryptionDictionary.java
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: