changeset 25b4cf13cadb in /home/hg/repos/python-nbxmpp
details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=25b4cf13cadb
description: Disable SCRAM-SHA-1-PLUS if channel binding is not supported.
Fixes #20
diffstat:
nbxmpp/auth_nb.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (16 lines):
diff -r 30c2e6474c1d -r 25b4cf13cadb nbxmpp/auth_nb.py
--- a/nbxmpp/auth_nb.py Sat Mar 01 21:26:17 2014 +0100
+++ b/nbxmpp/auth_nb.py Tue Mar 04 17:46:08 2014 +0100
@@ -188,8 +188,10 @@
# Password based authentication mechanism ordered by strength.
# If the server supports a mechanism disable all weaker mechanisms.
- password_auth_mechs_strength = ('SCRAM-SHA-1-PLUS', 'SCRAM-SHA-1',
- 'DIGEST-MD5', 'PLAIN', 'X-MESSENGER-OAUTH2')
+ password_auth_mechs_strength = ['SCRAM-SHA-1-PLUS', 'SCRAM-SHA-1',
+ 'DIGEST-MD5', 'PLAIN', 'X-MESSENGER-OAUTH2']
+ if self.channel_binding == None:
+ password_auth_mechs_strength.remove('SCRAM-SHA-1-PLUS')
for i in range(0, len(password_auth_mechs_strength)):
if password_auth_mechs_strength[i] in self.mecs:
for m in password_auth_mechs_strength[i + 1:]:
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits