Menu

#2199 Text file attachment with null character

KeePass_2.x
closed
nobody
5
2016-11-05
2016-10-30
Ryan Steed
No

Hi,

There appears to be a bug with the File Attachment feature. If a text file containing a null character is attached, only data preceding the null character is included, not the entire file.

Thanks,

Ryan

1 Attachments

Discussion

  • Paul

    Paul - 2016-10-31

    I can reproduce the problem on KeePass 2.34 using "binary (no conversion)" encoding - W8.1.

    cheers, Paul

     
  • Dominik Reichl

    Dominik Reichl - 2016-11-01
    • status: open --> closed
     
  • Dominik Reichl

    Dominik Reichl - 2016-11-01

    Well, the text editing controls of Windows don't support null characters in texts. I've now added code such that KeePass automatically replaces null characters by spaces, which is the behavior of Notepad (on Windows 10).

    Here's the latest development snapshot for testing:
    http://keepass.info/filepool/KeePass_161101b.zip

    Moving to closed feature requests.

    Thanks and best regards,
    Dominik

     
  • Dominik Reichl

    Dominik Reichl - 2016-11-01

    Ticket moved from /p/keepass/bugs/1582/

     
  • Ryan Steed

    Ryan Steed - 2016-11-01

    Thanks, I've confirmed that build 161101b fixes the problem. What is funny is that Microsoft's own Bitlocker Recovery Key text file has a null character! This is what brought it to my attention.

     
  • Paul

    Paul - 2016-11-02

    Does that mean you can't use the recovery key after the null has been replaced by a space?

    cheers, Paul

     
  • Ryan Steed

    Ryan Steed - 2016-11-03

    I'm not sure, this might affect the "automatic" USB recovery method. However as long as the remainder of the data within the recovery text file is intact, you can simply read the key and enter it in manually.

     
  • Paul

    Paul - 2016-11-03

    How do you enter a nul character?
    Are you able to test it?

    cheers, Paul

     
  • Ryan Steed

    Ryan Steed - 2016-11-05

    You'll never have to manually enter the null character. It is only at the head of the file. Here is a sample:

    BitLocker Drive Encryption recovery key[NULL]

    To verify that this is the correct recovery key, compare the start of the following identifier with the identifier value displayed on your PC.

    Identifier:

    A1234567-B123-C123-D123-E1234567890F

    If the above identifier matches the one displayed by your PC, then use the following key to unlock your drive.

    Recovery Key:

    123456-123456-123456-123456-123456-123456-123456-123456

    If the above identifier doesn't match the one displayed by your PC, then this isn't the right key to unlock your drive.
    Try another recovery key, or refer to http://go.microsoft.com/fwlink/?LinkID=260589 for additional assistance.

     

Log in to post a comment.