[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/master] Fix str/bytes issue in serving of QR code.
commit 63ffb833e2592558265d5b23b8b0e1d146daaae7
Author: Philipp Winter <phw@xxxxxxxxx>
Date: Fri Feb 14 10:06:46 2020 -0800
Fix str/bytes issue in serving of QR code.
---
bridgedb/distributors/https/server.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bridgedb/distributors/https/server.py b/bridgedb/distributors/https/server.py
index 98b31d0..503744e 100644
--- a/bridgedb/distributors/https/server.py
+++ b/bridgedb/distributors/https/server.py
@@ -1066,7 +1066,9 @@ class BridgesResource(CustomErrorHandlingResource, CSPResource):
qrjpeg = generateQR(bridgeLines)
if qrjpeg:
- qrcode = 'data:image/jpeg;base64,%s' % base64.b64encode(qrjpeg)
+ qrcode = b'data:image/jpeg;base64,%s' % base64.b64encode(qrjpeg)
+ qrcode = qrcode.decode("utf-8")
+
try:
langs = translations.getLocaleFromHTTPRequest(request)
rtl = translations.usingRTLLang(langs)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits