Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Net::XMPP in Win32 gets not-authorized, same code works 100% in Linux

by Corion (Patriarch)
on Jan 09, 2009 at 07:49 UTC ( [id://735108]=note: print w/replies, xml ) Need Help??


in reply to [fixed] Net::XMPP in Win32 gets not-authorized, same code works 100% in Linux

You're using tls => 1, which suggests to me that Net::XMPP::Client might try to load an SSL libary. Is the appropriate SSL library installed? I couldn't make out in the source which one the module will (try to) use.

Other than that, I can imagine different line endings as the culprit. I guess you will have to take a look at the difference between the two systems with Wireshark or another network sniffer.

  • Comment on Re: Net::XMPP in Win32 gets not-authorized, same code works 100% in Linux
  • Download Code

Replies are listed 'Best First'.
Re^2: Net::XMPP in Win32 gets not-authorized, same code works 100% in Linux
by wilsond (Scribe) on Jan 09, 2009 at 07:58 UTC

    I forgot to mention: It doesn't work whether it is set to TLS=1 or TLS=0. The XMPP server doesn't require it (I run the server) though I do plan to require it eventually.

    I'll try testing it with wireshark or the like and see what it comes up with. Thanks for the idea. I should have already done this.

      I think your problem is actually with XML::Stream. See this ticket for a patch: http://rt.cpan.org/Public/Bug/Display.html?id=24817
      According to wireshark, the packets are being sent properly and such. It uses DIGEST_MD5 as the auth. It appears to be a properly formatted hash that is sent to the XMPP server, but I haven't verified it yet. More testing to go. Thanks for your input.

        Here are the un-BASE64'd auth values being sent to the XMPP server.

        In Windows:

        authzid="bobthebuilder@example.com",charset=utf-8,cnonce="xxxxx1e3552e +9ea806f6411931b62b25",digest-uri="/",nc=00000001,nonce="xxxxx0dyy8ivm +M8JcDfy44rlPAvDprBeLWHfW4Ea",qop=auth,realm="example.com",response=xx +xxxd5b82f6faf7ed2feebcb70ba974,username="bobthebuilder"

        In Linux:

        authzid="bobthebuilder@example.com",charset=utf-8,cnonce="xxxxx895143c +dc97d8d8eada76acc50a",digest-uri="xmpp/example.com",nc=00000001,nonce +="xxxxx2YLz+OufKiUQ0zSBkaO1ntzY/Cpwg6+ns+l",qop=auth,realm="example.c +om",response=xxxxx7d0924f2093e95bc0da1b136092,username="bobthebuilder +"

        It seems the Windows version is missing the digest-uri value. I'm going to bet that my problem is there.

        Changing AuthSend to AuthIQAuth makes it work fine. This disables SASL. I'm not happy about it. Possibly TLS will take care of that? I'm going to find out.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://735108]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-18 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found