[tor-commits] [gettor/master] Ensure base64 encoded binaries are in ascii

cohosh at torproject.org cohosh at torproject.org
Thu Jan 23 16:41:47 UTC 2020

commit 1631494e1c7d313e46d0e5ed00bc6f0b0e50c209
Author: Cecylia Bocovich <cohosh at torproject.org>
Date:   Thu Jan 23 09:05:55 2020 -0500

    Ensure base64 encoded binaries are in ascii
    This fixes an issue that occurred while running the new gitlab script on
    the gettor machine. Newer library versions require the b64 encoded byte
    string to be converted to ascii text.
 scripts/update_git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/update_git b/scripts/update_git
index c398ff4..d107491 100755
--- a/scripts/update_git
+++ b/scripts/update_git
@@ -59,7 +59,7 @@ class GitlabRemote:
                     # Binary files need to be base64 encoded
                     'action': 'create',
                     'file_path': filename,
-                    'content': base64.b64encode(contents),
+                    'content': base64.b64encode(contents).decode("ascii"),
                     'encoding': 'base64',

More information about the tor-commits mailing list