[jdev] Figuring out what a client thinks its JID is

Nathan Fritz nathanfritz at gmail.com
Wed Mar 31 18:09:35 CDT 2010


By not using the same node as the authentication user, you're going
against two SHOULD suggestions in the RFC, however you're technically
ok to do this.  I would recommend against doing this on a public
service where you expect any IM client.  Your only recourses at this
point are to file bugs against libpurple and other clients or conform
to the RFC's recommendation.  At this point, it's an educational
campaign.  Good luck to you sir, and I'll certainly double-check my
libraries to make sure they do this.

In a direct answer to your question, some client libs put a "from" on
it's stanzas even though the server will replace whatever they put
there.  You could certainly look there, but if you act on this
information then you are likely breaking the spec with a whole slew of
potential consequences.

Another approach would be to ping
(http://xmpp.org/extensions/xep-0199.html) the client, and if no
response is given (they at least have to send an error to an iq
request), then you can assume that routing is not working correctly,
and try another ping with their SASL auth username as the node portion
of the jid and see if you get a response that way.  Note that you
haven't gained any knowledge if it responds to both or neither.  You
are, again, in violation of the spec by delivering stanzas where the
bare jid does not match their bound name, and you could cause
unintended consequences on the client (crashes or strange behavior) by
simply pinging them in this way.

I really don't see either of these options being viable as the client
is simply broken if it doesn't respond to it's bound fulljid and you
risk greater consequences if you try to "adjust" at the protocol
level.

-Fritzy


More information about the JDev mailing list