diff --git a/jabberpy-sha-deprecation.patch b/jabberpy-sha-deprecation.patch index 60c688a..6984744 100644 --- a/jabberpy-sha-deprecation.patch +++ b/jabberpy-sha-deprecation.patch @@ -1,6 +1,8 @@ ---- jabber/jabber.py 2011-02-22 11:15:44.706037736 +0100 -+++ jabber/jabber.py 2011-02-22 11:31:25.628921665 +0100 -@@ -65,7 +65,8 @@ +diff --git jabberpy-0.5-0/jabber/jabber.py jabberpy-0.5-0/jabber/jabber.py +index 3074aa5..ab9d9b3 100644 +--- jabber/jabber.py ++++ jabber/jabber.py +@@ -65,7 +65,8 @@ An example of usage for a simple client would be ( only psuedo code !) # $Id: jabber.py,v 1.58 2004/01/18 05:27:10 snakeru Exp $ import xmlstream @@ -10,16 +12,17 @@ debug=xmlstream.debug -@@ -524,7 +525,7 @@ +@@ -524,15 +525,15 @@ class Client(Connection): token = auth_ret_query.getTag('token').getData() seq = auth_ret_query.getTag('sequence').getData() self.DEBUG("zero-k authentication supported",(DBG_INIT,DBG_NODE_IQ)) - hash = sha.new(sha.new(passwd).hexdigest()+token).hexdigest() +- for foo in xrange(int(seq)): hash = sha.new(hash).hexdigest() + hash = hashlib.new('sha1', hashlib.new('sha1', passwd).hexdigest()+token).hexdigest() - for foo in xrange(int(seq)): hash = sha.new(hash).hexdigest() ++ for foo in xrange(int(seq)): hash = hashlib.new('sha1', hash).hexdigest() q.insertTag('hash').insertData(hash) -@@ -532,7 +533,7 @@ + elif auth_ret_query.getTag('digest'): self.DEBUG("digest authentication supported",(DBG_INIT,DBG_NODE_IQ)) digest = q.insertTag('digest') @@ -28,7 +31,7 @@ self.getIncomingID() + passwd).hexdigest() ) else: self.DEBUG("plain text authentication supported",(DBG_INIT,DBG_NODE_IQ)) -@@ -1397,7 +1398,7 @@ +@@ -1397,7 +1398,7 @@ class Component(Connection): def auth(self,secret): """will disconnect on failure""" self.send( u"%s" @@ -37,4 +40,3 @@ ) while not self._auth_OK: self.DEBUG("waiting on handshake") -