mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 11:09:56 +00:00
Merge branch 'master' into develop
Adds hotfix for ANONYMOUS mech support. Conflicts: sleekxmpp/__init__.py
This commit is contained in:
commit
6c4cb2bf00
2 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ class ANONYMOUS(Mechanism):
|
|||
def __init__(self, sasl, name):
|
||||
"""
|
||||
"""
|
||||
super(ANONYMOUS, self).__init__(self, sasl, name, 0)
|
||||
super(ANONYMOUS, self).__init__(sasl, name, 0)
|
||||
|
||||
def get_values(self):
|
||||
"""
|
||||
|
|
4
sleekxmpp/thirdparty/suelta/sasl.py
vendored
4
sleekxmpp/thirdparty/suelta/sasl.py
vendored
|
@ -225,7 +225,7 @@ class SASL(object):
|
|||
requested_mech = 'ANONYMOUS'
|
||||
else:
|
||||
requested_mech = self.mech
|
||||
if requested_mech == '*' and self.user == 'anonymous':
|
||||
if requested_mech == '*' and self.user in ['', 'anonymous', None]:
|
||||
requested_mech = 'ANONYMOUS'
|
||||
|
||||
# If a specific mechanism was requested, try it
|
||||
|
@ -243,7 +243,7 @@ class SASL(object):
|
|||
if MECH_SEC_SCORES[name] > best_score:
|
||||
best_score = MECH_SEC_SCORES[name]
|
||||
best_mech = name
|
||||
if best_mech != None:
|
||||
if best_mech is not None:
|
||||
best_mech = MECHANISMS[best_mech](self, best_mech)
|
||||
|
||||
return best_mech
|
||||
|
|
Loading…
Reference in a new issue