diff --git a/gluon/tools.py b/gluon/tools.py index f57e8dd7..716dafcd 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -2498,9 +2498,9 @@ class Auth(AuthAPI): success = True def build_response(body): - return '\n' +\ - TAG['cas:serviceResponse']( - body, **{'_xmlns:cas': 'http://www.yale.edu/tp/cas'}).xml() + xml_body = to_native(TAG['cas:serviceResponse']( + body, **{'_xmlns:cas': 'http://www.yale.edu/tp/cas'}).xml()) + return '\n' + xml_body if success: if version == 1: message = 'yes\n%s' % user[userfield]