summaryrefslogtreecommitdiffstats
path: root/Obok_plugin
diff options
context:
space:
mode:
authorAldo Bleeker <[email protected]>2021-06-28 16:59:15 +0200
committerNoDRM <[email protected]>2021-11-15 14:44:20 +0100
commit77dcc462aa7b568a2ca106bc18a6e016c32794ea (patch)
treee42118ec1a1bbf0cdb8a73be1d0248b5b6177fc7 /Obok_plugin
parentbe57bcca7da79c455aea2eed562d4e96ba6a09fe (diff)
Fix for decryption check
Diffstat (limited to 'Obok_plugin')
-rw-r--r--Obok_plugin/action.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Obok_plugin/action.py b/Obok_plugin/action.py
index 1a4515b..fb8f26e 100644
--- a/Obok_plugin/action.py
+++ b/Obok_plugin/action.py
@@ -375,7 +375,6 @@ class InterfacePluginAction(InterfaceAction):
#print ('Kobo library filename: {0}'.format(book.filename))
for userkey in self.userkeys:
print (_('Trying key: '), codecs.encode(userkey, 'hex'))
- check = True
try:
fileout = PersistentTemporaryFile('.epub', dir=self.tdir)
#print ('Temp file: {0}'.format(fileout.name))
@@ -396,8 +395,7 @@ class InterfacePluginAction(InterfaceAction):
file = book.encryptedfiles[filename]
contents = file.decrypt(userkey, contents)
# Parse failures mean the key is probably wrong.
- if check:
- check = not file.check(contents)
+ file.check(contents)
zout.writestr(filename, contents)
zout.close()
zin.close()