lack of jabber password yields an unexpected exception

Bug #618923 reported by anarcat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ibid
Confirmed
Medium
Unassigned

Bug Description

When you forget to enter a jabber password, you get that crazy error in stderr:

INFO source.jabber: Connecting to: hermes.jabber.org:5222
2010-08-16 15:47:00-0400 [XmlStream,client] Unhandled Error
        Traceback (most recent call last):
          File "/build/buildd-python2.5_2.5.2-15+lenny1-amd64-gBDyED/python2.5-2.5.2/Modules/pyexpat.c", line 656, in EndElement

          File "/usr/lib/python2.5/site-packages/twisted/words/xish/domish.py", line 780, in _onEndElement
            self.ElementEvent(self.currElem)
          File "/usr/lib/python2.5/site-packages/twisted/words/xish/xmlstream.py", line 106, in onElement
            self.dispatch(element)
          File "/usr/lib/python2.5/site-packages/twisted/words/xish/utility.py", line 316, in dispatch
            callbacklist.callback(obj)
        --- <exception caught here> ---
          File "/usr/lib/python2.5/site-packages/twisted/words/xish/utility.py", line 106, in callback
            methodwrapper(*args, **kwargs)
          File "/usr/lib/python2.5/site-packages/twisted/words/xish/utility.py", line 27, in __call__
            self.method(*nargs, **nkwargs)
          File "/usr/lib/python2.5/site-packages/twisted/words/protocols/jabber/sasl.py", line 193, in onChallenge
            self.sendResponse(self.mechanism.getResponse(challenge))
          File "/usr/lib/python2.5/site-packages/twisted/words/protocols/jabber/sasl_mechanisms.py", line 100, in getResponse
            directives['nonce'])
          File "/usr/lib/python2.5/site-packages/twisted/words/protocols/jabber/sasl_mechanisms.py", line 191, in _gen_response
            password = self.password.encode(charset)
        exceptions.AttributeError: 'NoneType' object has no attribute 'encode'

That seems a bit counter-intuitive... We should do a quick check on self.password and send a friendly message if None...

Max Rabkin (max-rabkin)
tags: added: config jabber
Revision history for this message
Keegan Carruthers-Smith (keegan-csmith) wrote :

Does jabber require a password? i.e Is passing None as password always invalid?

Revision history for this message
Stefano Rivera (stefanor) wrote :

I haven't read the spec, but I've also never come across jabber servers that don't require passwords :)

Changed in ibid:
importance: Undecided → Medium
milestone: none → 0.2.0
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.