changeset 5474:4c9192393cd9

encoding fixes
author Christof Meerwald <cmeerw@cmeerw.org>
date Sun, 29 Jul 2018 01:33:07 +0100
parents 3afda04c96a1
children da22ff1c3501
files roundup/cgi/client.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/roundup/cgi/client.py	Sun Jul 29 01:31:48 2018 +0100
+++ b/roundup/cgi/client.py	Sun Jul 29 01:33:07 2018 +0100
@@ -479,7 +479,7 @@
                                            self.instance.actions,
                                            self.translator,
                                            allow_none=True)
-            output = s2b(handler.dispatch(input))
+            output = handler.dispatch(input)
 
         self.setHeader("Content-Type", "text/xml")
         self.setHeader("Content-Length", str(len(output)))
@@ -845,10 +845,10 @@
                 scheme, challenge = auth.split(' ', 1)
                 if scheme.lower() == 'basic':
                     try:
-                        decoded = base64.decodestring(challenge)
+                        decoded = b2s(base64.b64decode(challenge))
                     except TypeError:
                         # invalid challenge
-                        pass
+                        decoded = ''
                     username, password = decoded.split(':', 1)
                     try:
                         # Current user may not be None, otherwise

Roundup Issue Tracker: http://roundup-tracker.org/