From 96fb2df0e33b34a4dbb75577de8589a8611759c4 Mon Sep 17 00:00:00 2001 From: Andrej Shadura Date: Mon, 30 Nov 2020 12:16:10 +0100 Subject: New upstream version 2.8.1 --- ldap3/protocol/sasl/digestMd5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ldap3/protocol/sasl/digestMd5.py') diff --git a/ldap3/protocol/sasl/digestMd5.py b/ldap3/protocol/sasl/digestMd5.py index 48235d6..520be3c 100644 --- a/ldap3/protocol/sasl/digestMd5.py +++ b/ldap3/protocol/sasl/digestMd5.py @@ -94,7 +94,7 @@ def sasl_digest_md5(connection, controls): authz_id = connection.sasl_credentials[3].encode(charset) if connection.sasl_credentials[3] else b'' nonce = server_directives['nonce'].encode(charset) cnonce = random_hex_string(16).encode(charset) - uri = b'ldap/' + uri = b'ldap/' + connection.server.host.encode(charset) qop = b'auth' digest_response = b'username="' + user + b'",' @@ -110,7 +110,7 @@ def sasl_digest_md5(connection, controls): a0 = md5_h(b':'.join([user, realm, password])) a1 = b':'.join([a0, nonce, cnonce, authz_id]) if authz_id else b':'.join([a0, nonce, cnonce]) - a2 = b'AUTHENTICATE:' + uri + (':00000000000000000000000000000000' if qop in [b'auth-int', b'auth-conf'] else b'') + a2 = b'AUTHENTICATE:' + uri + (b':00000000000000000000000000000000' if qop in [b'auth-int', b'auth-conf'] else b'') digest_response += b'response="' + md5_hex(md5_kd(md5_hex(md5_h(a1)), b':'.join([nonce, b'00000001', cnonce, qop, md5_hex(md5_h(a2))]))) + b'"' -- cgit v1.2.3