rpcserver: remove addition of str and bytes

base64 encoding returns bytes but these can't be added together with
a string.

https://pagure.io/freeipa/issue/4985

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Stanislav Laznicka
2017-06-27 13:45:52 +02:00
committed by Martin Basti
parent db4d0998fd
commit d308abac2e

View File

@@ -545,7 +545,8 @@ class NegotiateAuth(AuthBase):
return token return token
def _set_authz_header(self, request, token): def _set_authz_header(self, request, token):
request.headers['Authorization'] = 'Negotiate ' + b64encode(token) request.headers['Authorization'] = (
'Negotiate {}'.format(b64encode(token).decode('utf-8')))
def initial_step(self, request, response=None): def initial_step(self, request, response=None):
if self.context is None: if self.context is None: