[tor-commits] [bridgedb/master] Don't strip() crazy amount of trailing '='s in gen_bridge_descriptors.

isis at torproject.org isis at torproject.org
Sun Jan 12 06:06:33 UTC 2014


commit 44d472ba8e751e03d720a6efa06c0ef722e0e817
Author: Isis Lovecruft <isis at torproject.org>
Date:   Wed Dec 11 01:51:32 2013 +0000

    Don't strip() crazy amount of trailing '='s in gen_bridge_descriptors.
    
    Base64 padding will only ever result in a maximum of two trailing '='s
    characters, not a gazillion.
---
 scripts/gen_bridge_descriptors |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen_bridge_descriptors b/scripts/gen_bridge_descriptors
index cfa4a1c..dae1561 100644
--- a/scripts/gen_bridge_descriptors
+++ b/scripts/gen_bridge_descriptors
@@ -623,7 +623,7 @@ def generateNetstatus(idkey_digest, server_desc_digest, timestamp,
     """
 
     idkey_b64  = binascii.b2a_base64(idkey_digest)
-    idb64      = str(idkey_b64).strip().rstrip('=========')
+    idb64      = str(idkey_b64).strip().rstrip('==')
     server_b64 = binascii.b2a_base64(server_desc_digest)
     srvb64     = str(server_b64).strip()
 





More information about the tor-commits mailing list