[jdev] Necessity of stringprep support for the client

Kevin Smith kevin at kismith.co.uk
Sun Aug 19 08:35:36 UTC 2012


On Sun, Aug 19, 2012 at 4:29 AM, Waqas Hussain <waqas20 at gmail.com> wrote:
> 3. Stanzas
>
> The server gives you back a <jid-malformed/> error. What more do you need?

For sending, yes - but you also need to be comparing JIDs that you
receive, and you need to prep them before comparison.

Let's say you send an iq to=someunpreppedJID. You receive an iq
result, you check the ID matches - it does, you check the from matches
the to you sent - it doesn't, you bin the stanza as unsolicited.
Except had you prepped the to/from before comparison you'd have found
a match.

If clients don't prep there's the chance for assorted things to get
broken in interesting ways.

/K


More information about the JDev mailing list