mirror of
https://github.com/r4sas/PBinCLI
synced 2025-09-01 08:32:16 +00:00
check passphrase length in v1 paste type with base64 (#42)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
ac0a145865
commit
afd2d58c61
@ -120,6 +120,8 @@ class Paste:
|
|||||||
from base58 import b58decode
|
from base58 import b58decode
|
||||||
self._key = b58decode(passphrase)
|
self._key = b58decode(passphrase)
|
||||||
else:
|
else:
|
||||||
|
if (len(passphrase) % 4 != 0):
|
||||||
|
PBinCLIError("Incorrect passphrase! Maybe you have stripped trailing \"=\"?")
|
||||||
self._key = b64decode(passphrase)
|
self._key = b64decode(passphrase)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user