librelist archives

« back to archive

pre-bind with xmpp-prebind

pre-bind with xmpp-prebind

From:
Jothi Sankar
Date:
2014-11-01 @ 04:34
Hi all,

I am being tried to prebind my users when page gets loaded using
xmpp-prebind in php. Its always returns non-authorized as response and
getting a fatel error in screen

    Fatal error: Uncaught exception 'XmppPrebindConnectionException' with
message 'Invalid challenge
    response received' in
D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\XmppPrebind.php:420
    Stack trace: #0
D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\XmppPrebind.php(381):
    XmppPrebind->replyToChallengeResponse('<body xmlns='ht...') #1
    D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\XmppPrebind.php(164):
XmppPrebind->sendChallengeAndBuildDigestMd5Auth(Object(Auth_SASL_DigestMD5))
#2
    D:\xampp\htdocs\chat\chat\chat.php(21): XmppPrebind->auth() #3 {main}
thrown in
    D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\XmppPrebind.php on
line 420

and here is my console log.

     SENT
     <?xml version="1.0" encoding="UTF-8"?>
     <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml
charset=utf-8" rid="1358670454" xml:lang="en" hold="1" to="182.92.156.24"
xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0" wait="60"/>

 D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\FirePHP\FirePHP.class.php:584
VM3579:3

    RECV:
    <body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="
http://etherx.jabber.org/streams" authid="178e0744" sid="178e0744"
secure="true" requests="2" inactivity="30" polling="5"
wait="60"><stream:features><mechanisms

xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression

xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind
xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session
xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features></body>

D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\FirePHP\FirePHP.class.php:584
VM3581:3

    sid 178e0744

D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\FirePHP\FirePHP.class.php:584
VM3582:3

    encryption used DIGEST-MD5

D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\FirePHP\FirePHP.class.php:584
VM3583:3

    SENT
    <?xml version="1.0" encoding="UTF-8"?>
    <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml
charset=utf-8" rid="1358670455" xml:lang="en" sid="178e0744"><auth
xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5"/></body>

D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\FirePHP\FirePHP.class.php:584
VM3584:3

    RECV:
    <body xmlns='http://jabber.org/protocol/httpbind'><challenge

xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09Iml6MjVwa2Y5YzdoeiIsbm9uY2U9IjV6Wk1CYlJyQndoNnZiS3hLTU14Q2FpbUcralpjVkpKQUhHeWZ4eEwiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge></body>

D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\FirePHP\FirePHP.class.php:584
VM3585:3

    DIGEST-MD5 Auth String
username="bala101",realm="iz25pkf9c7hz",authzid="bala101@iz25pkf9c7hz

",nonce="5zZMBbRrBwh6vbKxKMMxCaimG+jZcVJJAHGyfxxL",cnonce="Nr7EehsBTi+VtQ0enB0Xc4REu+YIP0cCO4AtPZD9nGI=",nc=00000001,qop=auth,digest-uri="xmpp/
182.92.156.24",response=eee121d819507c2efb22e0fc66851049,maxbuf=65536

D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\FirePHP\FirePHP.class.php:584
VM3586:3

    SENT
    <?xml version="1.0" encoding="UTF-8"?>
    <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml
charset=utf-8" rid="1358670456" xml:lang="en" sid="178e0744"><response

xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9ImJhbGExMDEiLHJlYWxtPSJpejI1cGtmOWM3aHoiLGF1dGh6aWQ9ImJhbGExMDFAaXoyNXBrZjljN2h6Iixub25jZT0iNXpaTUJiUnJCd2g2dmJLeEtNTXhDYWltRytqWmNWSkpBSEd5Znh4TCIsY25vbmNlPSJOcjdFZWhzQlRpK1Z0UTBlbkIwWGM0UkV1K1lJUDBjQ080QXRQWkQ5bkdJPSIsbmM9MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC8xODIuOTIuMTU2LjI0IixyZXNwb25zZT1lZWUxMjFkODE5NTA3YzJlZmIyMmUwZmM2Njg1MTA0OSxtYXhidWY9NjU1MzY=</response></body>

 D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\FirePHP\FirePHP.class.php:584
VM3587:3

     RECV:
     <body xmlns='http://jabber.org/protocol/httpbind'><failure
xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure></body>

 D:\xampp\htdocs\chat\chat\assets\xmpp-prebind\lib\FirePHP\FirePHP.class.php:584

here is my FireBug debug log

    SENT:
    RECV::DIGEST-MD5PLAINANONYMOUSCRAM-MD5zlib
    sid:178e0744
    encryption used:DIGEST-MD5
    SENT:


RECV::cmVhbG09Iml6MjVwa2Y5YzdoeiIsbm9uY2U9IjV6Wk1CYlJyQndoNnZiS3hLTU14Q2FpbUcralpjVkpKQUhHeWZ4eEwiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=
    DIGEST-MD5 Auth
String:username="bala101",realm="iz25pkf9c7hz",authzid="bala101@iz25pkf9c7hz

",nonce="5zZMBbRrBwh6vbKxKMMxCaimG+jZcVJJAHGyfxxL",cnonce="Nr7EehsBTi+VtQ0enB0Xc4REu+YIP0cCO4AtPZD9nGI=",nc=00000001,qop=auth,digest-uri="xmpp/
182.92.156.24",response=eee121d819507c2efb22e0fc66851049,maxbuf=65536


SENT:dXNlcm5hbWU9ImJhbGExMDEiLHJlYWxtPSJpejI1cGtmOWM3aHoiLGF1dGh6aWQ9ImJhbGExMDFAaXoyNXBrZjljN2h6Iixub25jZT0iNXpaTUJiUnJCd2g2dmJLeEtNTXhDYWltRytqWmNWSkpBSEd5Znh4TCIsY25vbmNlPSJOcjdFZWhzQlRpK1Z0UTBlbkIwWGM0UkV1K1lJUDBjQ080QXRQWkQ5bkdJPSIsbmM9MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC8xODIuOTIuMTU2LjI0IixyZXNwb25zZT1lZWUxMjFkODE5NTA3YzJlZmIyMmUwZmM2Njg1MTA0OSxtYXhidWY9NjU1MzY=
    RECV::


Please forgive me if its looks like childish.
Please let me know Whats wrong here?

-- 
with regards,
Jothi sankar K