1
1
mirror of https://github.com/r4sas/PBinCLI synced 2025-03-12 13:21:27 +00:00

check passphrase length in v1 paste type with base64 (#42)

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2025-02-15 19:00:40 +03:00
parent ac0a145865
commit afd2d58c61
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2

View File

@ -120,6 +120,8 @@ class Paste:
from base58 import b58decode
self._key = b58decode(passphrase)
else:
if (len(passphrase) % 4 != 0):
PBinCLIError("Incorrect passphrase! Maybe you have stripped trailing \"=\"?")
self._key = b64decode(passphrase)