summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2018-12-27 16:55:47 +0100
committermathieui <mathieui@mathieui.net>2018-12-27 16:55:47 +0100
commitecdc44a60166292dd197ba7f056af7649e716ac0 (patch)
tree42048c1c4cc9bf6f31c98d90e913bfe7f3a08d68
parent33370e42f11d7cb55b0d7029cc5516f1370bbca4 (diff)
parent2d228bdb56373ef006f59eed107a2f9d6757e917 (diff)
downloadslixmpp-ecdc44a60166292dd197ba7f056af7649e716ac0.tar.gz
slixmpp-ecdc44a60166292dd197ba7f056af7649e716ac0.tar.bz2
slixmpp-ecdc44a60166292dd197ba7f056af7649e716ac0.tar.xz
slixmpp-ecdc44a60166292dd197ba7f056af7649e716ac0.zip
Merge branch 'master' into 'master'
Decode bytes in GSSAPI handling, as expected by the kerberos module API. See merge request poezio/slixmpp!8
-rw-r--r--slixmpp/util/sasl/mechanisms.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/slixmpp/util/sasl/mechanisms.py b/slixmpp/util/sasl/mechanisms.py
index 36b2795c..874787a9 100644
--- a/slixmpp/util/sasl/mechanisms.py
+++ b/slixmpp/util/sasl/mechanisms.py
@@ -516,13 +516,13 @@ else:
def setup(self, name):
authzid = self.credentials['authzid']
if not authzid:
- authzid = 'xmpp@%s' % self.credentials['service-name']
+ authzid = 'xmpp@' + self.credentials['service-name'].decode()
_, self.gss = kerberos.authGSSClientInit(authzid)
self.step = 0
def process(self, challenge=b''):
- b64_challenge = b64encode(challenge)
+ b64_challenge = b64encode(challenge).decode('ascii')
try:
if self.step == 0:
result = kerberos.authGSSClientStep(self.gss, b64_challenge)
@@ -536,7 +536,7 @@ else:
kerberos.authGSSClientUnwrap(self.gss, b64_challenge)
resp = kerberos.authGSSClientResponse(self.gss)
- kerberos.authGSSClientWrap(self.gss, resp, username)
+ kerberos.authGSSClientWrap(self.gss, resp, username.decode())
resp = kerberos.authGSSClientResponse(self.gss)
except kerberos.GSSError as e: