Giter VIP home page Giter VIP logo

Comments (3)

Evidlo avatar Evidlo commented on May 30, 2024

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>

from pykeepass.

hpierre001 avatar hpierre001 commented on May 30, 2024

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"

from pykeepass.

Evidlo avatar Evidlo commented on May 30, 2024

test3.key in this repo already has DOS line endings, so that can't be it.

[evan@blackbox tests] od -bc test3.key 
0000000 074 077 170 155 154 040 166 145 162 163 151 157 156 075 042 061
          <   ?   x   m   l       v   e   r   s   i   o   n   =   "   1
0000020 056 060 042 040 145 156 143 157 144 151 156 147 075 042 165 164
          .   0   "       e   n   c   o   d   i   n   g   =   "   u   t
0000040 146 055 070 042 077 076 015 012 074 113 145 171 106 151 154 145
          f   -   8   "   ?   >  \r  \n   <   K   e   y   F   i   l   e
0000060 076 015 012 011 074 115 145 164 141 076 015 012 011 011 074 126
          >  \r  \n  \t   <   M   e   t   a   >  \r  \n  \t  \t   <   V
0000100 145 162 163 151 157 156 076 061 056 060 060 074 057 126 145 162
          e   r   s   i   o   n   >   1   .   0   0   <   /   V   e   r
0000120 163 151 157 156 076 015 012 011 074 057 115 145 164 141 076 015
          s   i   o   n   >  \r  \n  \t   <   /   M   e   t   a   >  \r
0000140 012 011 074 113 145 171 076 015 012 011 011 074 104 141 164 141
         \n  \t   <   K   e   y   >  \r  \n  \t  \t   <   D   a   t   a
0000160 076 121 160 071 115 162 106 115 061 122 160 123 114 117 070 151
          >   Q   p   9   M   r   F   M   1   R   p   S   L   O   8   i
0000200 110 132 110 107 101 151 120 142 162 070 132 053 150 104 106 160
          H   Z   H   G   A   i   P   b   r   8   Z   +   h   D   F   p
0000220 160 060 143 147 164 110 053 122 115 060 150 167 075 074 057 104
          p   0   c   g   t   H   +   R   M   0   h   w   =   <   /   D
0000240 141 164 141 076 015 012 011 074 057 113 145 171 076 015 012 074
          a   t   a   >  \r  \n  \t   <   /   K   e   y   >  \r  \n   <
0000260 057 113 145 171 106 151 154 145 076 015 012
          /   K   e   y   F   i   l   e   >  \r  \n
0000273

Is there a keyfile that I can reproduce this issue with?

from pykeepass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.