Changeset 76:2919e60d3588


Ignore:
Timestamp:
Dec 28, 2009, 12:13:34 PM (11 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Message:

Sync with Twisted changes involving hashPassword.

See http://twistedmatrix.com/trac/ticket/3847.

Location:
wokkel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wokkel/component.py

    r54 r76  
    158158
    159159    @ivar secret: The shared used to authorized incoming component connections.
    160     @type secret: C{str}.
     160    @type secret: C{unicode}.
    161161    """
    162162
     
    237237        be exchanged.
    238238        """
    239         calculatedHash = xmlstream.hashPassword(self.xmlstream.sid, self.secret)
     239        calculatedHash = xmlstream.hashPassword(self.xmlstream.sid,
     240                                                unicode(self.secret))
    240241        if handshake != calculatedHash:
    241242            exc = error.StreamError('not-authorized', text='Invalid hash')
  • wokkel/test/test_component.py

    r54 r76  
    369369        xs = self.xmlstream
    370370        xs.addOnetimeObserver(xmlstream.STREAM_AUTHD_EVENT, authenticated)
    371         xs.sid = '1234'
     371        xs.sid = u'1234'
    372372        theHash = '32532c0f7dbf1253c095b18b18e36d38d94c1256'
    373373        xs.authenticator.onHandshake(theHash)
     
    390390        xs.sendStreamError = streamErrors.append
    391391
    392         xs.sid = '1234'
     392        xs.sid = u'1234'
    393393        theHash = '1234'
    394394        xs.authenticator.onHandshake(theHash)
Note: See TracChangeset for help on using the changeset viewer.