New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: keyfile with multiline text in Key/Data #337
Comments
Can you paste an example key file which causes the error? I'm not able to reproduce this on Linux: >>> lxml.__version__
'4.9.1'
>>> from pykeepass import PyKeePass; kp = PyKeePass('test3.kdbx', 'password', '/tmp/test3_test.key')
>>> !cat /tmp/test3_test.key
<?xml version="1.0" encoding="utf-8"?>
<KeyFile>
<Meta>
<Version>1.00</Version>
</Meta>
<Key>
<Data>Qp9MrFM1RpSLO8iHZHGAiP
br8Z+hDFpp0cgtH+RM0hw=</Data>
</Key>
</KeyFile> |
It was one produced on windows and then used on Linux so it must be due to the use by windows of "\r\n" as a new line character instead of "\n" |
Is there a keyfile that I can reproduce this issue with? |
I'll assume this is resolved for now. |
When the key data is on multiple lines, parsing it with lxml 4.9.1 in a linux environnement, lets newline and tab in the middle which can't be striped by strip, leading to an error with bytes.fromhex (line 129 of pykeepass/common.py).
PS: the error doesn't occur on windows with lxml 4.9.2
The text was updated successfully, but these errors were encountered: