fritzy / SleekXMPP

Python 2.6+/3.1+ XMPP Library
http://groups.google.com/group/sleekxmpp-discussion
Other
1.1k stars 299 forks source link

Authentication failed: malformed-request #290

Closed michael-ts closed 10 years ago

michael-ts commented 10 years ago

I am using the "Sign in, Send a Message, and Disconnect" program located here: http://sleekxmpp.com/getting_started/sendlogout.html. However, when I run the program, I get an error which appears to be generated by the server. Here are the relevant lines of output from running with the "-d" option:

DEBUG     ==== TRANSITION disconnected -> connected
DEBUG    Starting HANDLER THREAD
DEBUG    Loading event runner
DEBUG    SEND (IMMED): <stream:stream to='jabber.local.net' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' xml:lang='en' version='1.0'>
DEBUG    RECV: <stream:stream version="1.0" from="jabber.local.net" id="faa068bnzg3m95w5hr19nm9q7ni0sw17391ifq34">
DEBUG    RECV: <stream:features xmlns="http://etherx.jabber.org/streams"><address xmlns="http://affinix.com/jabber/address">192.168.0.35</address><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>DIGEST-MD5</mechanism></mechanisms><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
INFO     SASL: DIGEST-MD5: Unencrypted DIGEST
DEBUG    SEND (IMMED): <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">AG1pY2hhZWwAeG1wcFsnZmVhdHVyZV9tZWNoYW5pc21zJ10udW5lbmNyeXB0ZWRfcGxhaW4gPSBUcnVl</auth>
DEBUG    RECV: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><malformed-request /></failure>
INFO     Authentication failed: malformed-request
DEBUG    Event triggered: failed_auth
INFO     SASL: DIGEST-MD5: Unencrypted DIGEST
ERROR    No appropriate login method.

I saw a similar issue producing the "No appropriate login method" for which the solution was to add "xmpp['feature_mechanisms'].unencrypted_plain = True" but that did not work for this case. If there a similar feature mechanism that must be added for this case I don't see what it is.

michael-ts commented 10 years ago

I did another quick test to get it to work with gchat (which it did although I had to specify the server in the connect call), and noticed the need to installed dnspython to avoid the need to explicitly specify the server to connect to. After doing that, strangely enough, the avoid error went away with the local server.

fritzy commented 10 years ago

Oddly, your password appears to be a snippet of Python.

michael-ts commented 10 years ago

How do you come to that conclusion?

fritzy commented 10 years ago