nHi,

On Sun, 5 Jul 2009 at 23:02, Tomasz Sterna wrote:

On czw, 2009-07-02 at 19:25 +0200, Reinhard Max wrote:
I just tried it with jabberd 2.2.8.91 and found that on a freshly started jabberd, the first connection to each of the virtual domains fails and c2s logs

"SASL callback for non-existing host: ..."

I cannot reproduce it.

the problem persists here in 2.2.9, but I've been able to track it down a bit, so that hopefully you can reproduce it as well. It only happens on the first connection to a c2s instance for a domain that has no explicit <id> entry in c2s.xml and is thus handled through the default vhost <id/>.

In that case the <challenge> stanza from c2s has the realm set to the server's local hostname instead of the domain name of the requested vHost and the client's answer using that realm then gets rejected by the server as being malformed. Subsequent connections get the correct realm and authentication succeeds.

Here is the (anonymized) raw XML output of Tkabber for such a failed connection attempt with the local hostname being "myhost" and the domain name being "example.com":

IN(::xmpp::2,[email protected]/tkabber):
<stream:stream from='example.com' version='1.0' id='ig4qw1pnb1azxw64l3v2clj0qukbszgafl1bmrzx'>
IN(::xmpp::2,[email protected]/tkabber):
<features xmlns='http://etherx.jabber.org/streams'>
<address xmlns='http://affinix.com/jabber/address'>xxx.xxx.xxx.xxx</address>
  <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
    <mechanism>DIGEST-MD5</mechanism>
  </mechanisms>
  <auth xmlns='http://jabber.org/features/iq-auth'/>
  <register xmlns='http://jabber.org/features/iq-register'/>
</features>
OUT(::xmpp::2,[email protected]/tkabber):
<auth mechanism='DIGEST-MD5'
        xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
IN(::xmpp::2,[email protected]/tkabber):
<challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>bm9uY2U9ImtrTWlCMUlNV0tJM1Qrc3Q2ZFc1U2JwU3RoMWFPOTNmSUR5M1B1eXZOVG89IixyZWFsbT0ibXlob3N0Iixxb3A9ImF1dGgsYXV0aC1pbnQsYXV0aC1jb25mIixjaXBoZXI9InJjNC00MCxyYzQtNTYscmM0LGRlcywzZGVzIixtYXhidWY9MTAyNCxjaGFyc2V0PXV0Zi04LGFsZ29yaXRobT1tZDUtc2Vzcw==</challenge>
OUT(::xmpp::2,[email protected]/tkabber):
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJteWhvc3QiLG5vbmNlPSJra01pQjFJTVdLSTNUK3N0NmRXNVNicFN0aDFhTzkzZklEeTNQdXl2TlRvPSIsbmM9IjAwMDAwMDAxIixjbm9uY2U9ImQ0MjVkZWNhMzFiYTFmM2M3ZjcxZDg0MzdiZTBlMWJhIixkaWdlc3QtdXJpPSJ4bXBwL215aG9zdCIscmVzcG9uc2U9Ijc2NjdhMTFkYTVhZWQ0YWM5YzFlOTE2OGVmNzgyMGZlIixxb3A9YXV0aCxjaGFyc2V0PXV0Zi04</response>
IN(::xmpp::2,[email protected]/tkabber):
<failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
  <malformed-request/>
</failure>
OUT(::xmpp::2,[email protected]/tkabber):
</stream:stream>


cu
        Reinhard

--
To unsubscribe send a mail to [email protected]

Reply via email to