From 99658eb24a2cd2bb2c23147a837f9402c11de160 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 25 Oct 2017 13:07:44 -0300 Subject: [bug] TypeError: Incorrect padding preamble.py wasn't using urlsafe version of base64, while all other parts of blobs were using it. --Resolves: #8980 --- src/leap/soledad/common/blobs/preamble.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/leap') diff --git a/src/leap/soledad/common/blobs/preamble.py b/src/leap/soledad/common/blobs/preamble.py index a8446c0d..c84ec0fa 100644 --- a/src/leap/soledad/common/blobs/preamble.py +++ b/src/leap/soledad/common/blobs/preamble.py @@ -84,7 +84,7 @@ class Preamble(object): def decode_preamble(encoded_preamble, armored=False): if armored: - encoded_preamble = base64.b64decode(encoded_preamble) + encoded_preamble = base64.urlsafe_b64decode(encoded_preamble) preamble_size = len(encoded_preamble) try: if preamble_size == LEGACY_PACMAN.size: -- cgit v1.2.3