mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-30 19:19:55 +00:00
Merge branch 'master' of git@github.com:fritzy/SleekXMPP
This commit is contained in:
commit
8ad32d2065
1 changed files with 4 additions and 1 deletions
|
@ -76,6 +76,9 @@ class ComponentXMPP(basexmpp, XMLStream):
|
|||
def start_stream_handler(self, xml):
|
||||
sid = xml.get('id', '')
|
||||
handshake = ET.Element('{jabber:component:accept}handshake')
|
||||
if sys.version_info < (3,0):
|
||||
handshake.text = hashlib.sha1("%s%s" % (sid, self.secret)).hexdigest().lower()
|
||||
else:
|
||||
handshake.text = hashlib.sha1(bytes("%s%s" % (sid, self.secret), 'utf-8')).hexdigest().lower()
|
||||
self.sendXML(handshake)
|
||||
|
||||
|
|
Loading…
Reference in a new issue