Skip to content

Commit d08a966

Browse files
committed
pykeepass: Update to 4.0.7.post1
We also update the patch with commit actually merged as part of libkeepass/pykeepass#388.
1 parent a2d0db9 commit d08a966

File tree

2 files changed

+24
-40
lines changed

2 files changed

+24
-40
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,28 @@
1-
From fca73313b77d2c8ea32db8b21858745500c334ec Mon Sep 17 00:00:00 2001
2-
From: Jan-Michael Brummer <[email protected]>
3-
Date: Tue, 26 Mar 2024 10:27:48 +0100
4-
Subject: [PATCH] Fix composite key computation for BytesIO
1+
From a5fa7e06c5dd73f41d124e7697d14ce7c9d1eb43 Mon Sep 17 00:00:00 2001
2+
From: evan <[email protected]>
3+
Date: Tue, 9 Apr 2024 14:46:07 -0500
4+
Subject: [PATCH] bump version
55

6-
In case a keyfile as BytesIO has been read before, the
7-
next read will be empty. We need to ensure that we
8-
are reading the data from the beginning.
9-
10-
Add seek to start to fix it.
116
---
12-
pykeepass/kdbx_parsing/common.py | 9 ++++++++-
13-
1 file changed, 8 insertions(+), 1 deletion(-)
7+
requirements.txt | 9 +++++++++
8+
1 file changed, 9 insertions(+)
9+
create mode 100644 requirements.txt
1410

15-
diff --git a/pykeepass/kdbx_parsing/common.py b/pykeepass/kdbx_parsing/common.py
16-
index 3973f61..1865bb4 100644
17-
--- a/pykeepass/kdbx_parsing/common.py
18-
+++ b/pykeepass/kdbx_parsing/common.py
19-
@@ -13,6 +13,7 @@ import unicodedata
20-
import zlib
21-
import re
22-
import codecs
23-
+import io
24-
from io import BytesIO
25-
from collections import OrderedDict
26-
import logging
27-
@@ -116,7 +117,13 @@ def compute_key_composite(password=None, keyfile=None):
28-
password_composite = b''
29-
# hash the keyfile
30-
if keyfile:
31-
- if hasattr(keyfile, "read"):
32-
+ if (
33-
+ isinstance(keyfile, io.BufferedIOBase)
34-
+ or isinstance(keyfile, io.TextIOBase)
35-
+ or isinstance(keyfile, io.RawIOBase)
36-
+ ):
37-
+ if keyfile.seekable():
38-
+ keyfile.seek(0)
39-
keyfile_bytes = keyfile.read()
40-
else:
41-
with open(keyfile, 'rb') as f:
11+
diff --git a/requirements.txt b/requirements.txt
12+
new file mode 100644
13+
index 0000000..5cd6bd7
14+
--- /dev/null
15+
+++ b/requirements.txt
16+
@@ -0,0 +1,9 @@
17+
+argon2-cffi==23.1.0
18+
+argon2-cffi-bindings==21.2.0
19+
+cffi==1.16.0
20+
+construct==2.10.70
21+
+lxml==5.2.1
22+
+pycparser==2.22
23+
+pycryptodomex==3.20.0
24+
+pykeepass @ file:///home/evan/resources/pykeepass
25+
+pyotp==2.9.0
4226
--
4327
2.44.0
4428

python3-pykeepass.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"sources": [
88
{
99
"type": "archive",
10-
"url": "https://files.pythonhosted.org/packages/e1/ca/2da205bb1baa9f86b9cc36145ab5435fbc50ee3cc136e4a90356dbbdc3d2/pykeepass-4.0.7.tar.gz",
11-
"sha256": "56ce2a1d22c204c838e6501796e0acce8ba9f50ade821111aaa1458f9d1a775e"
10+
"url": "https://files.pythonhosted.org/packages/c5/3a/dc4c067aa600e7fdb38a4981ce40768fc75c6b6b708f305ec7c94c767f72/pykeepass-4.0.7.post1.tar.gz",
11+
"sha256": "04090d79cf121686b51c4c84d5bc6a62cd47b8337f8c0158caa9e845df803131"
1212
},
1313
{
1414
"type": "patch",

0 commit comments

Comments
 (0)