PDA

View Full Version : [jdev] ConnContext.username in XMPP


Kjell Braden
06-22-2008, 04:43 PM
Hi,

I'm writing this to both otr-dev and . Please CC both lists on replying.

I recently came across an issue about the addressing of conversation
contexts in the XMPP protocol.

IMO, the most sensible way to identify a user in a context is to use the
full jid (ie. with resource: "user (AT) server (DOT) tld/resource"), because you
could have multiple conversations to one user, where one resource knows
OTR and another doesn't.

OTOH, we have a problem when the local user does not know the resources
of the remote user for any reason. This can be the case when they are
not subscribed to each other, or when the remote user is invisible. The
remote user could start an OTR session and the stanza would contain a
resource (from="user (AT) server (DOT) tld/resource").

Now the local user receives the message and creates a context for
"user (AT) server (DOT) tld/resource". But since the local user does not know about
any resources, the messages he sends have to be sent to
"user (AT) server (DOT) tld".
The OTR lib now checks for the context with the remote user
"user (AT) server (DOT) tld" and will find nothing, as it only knows the full JID.
So, it will not encrypt the sent message to the remote user, because it
does not find any conversation context. The remote user will see the
message as "not encrypted though we should be encrypted", because he
started the encrypted conversation.

Any ideas/thoughts on how to handle this case?

Kjell

_______________________________________________
JDev mailing list
FAQ: http://www.jabber.org/discussion-lists/jdev-faq
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: JDev-unsubscribe (AT) jabber (DOT) org
_______________________________________________

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBIXmS7NjvKGrx0tZgRAsTKAKCZcO41dJ+FzohfHzz3in uFHmfyUwCgiC9z
Dv0mOB7Pjsds2/85auo47f0=
=NU4R
-----END PGP SIGNATURE-----

Jonathan Schleifer
06-22-2008, 05:31 PM
Kjell Braden <fnord (AT) pentabarf (DOT) de> wrote:

> Now the local user receives the message and creates a context for
> "user (AT) server (DOT) tld/resource". But since the local user does not know
> about any resources, the messages he sends have to be sent to
> "user (AT) server (DOT) tld".

Not exactly. That's no problem at all. If you receive a message from a
resource, you can very well answer to that resource.
The problem you'll get is when you first send a message, don't know the
resource and thus send to the bare JID, but get an answer from the full
JID.

PS: Sorry, I had to sent it as two separate messages to both MLs since
I use different sender adresses for both.

--
Jonathan

_______________________________________________
JDev mailing list
FAQ: http://www.jabber.org/discussion-lists/jdev-faq
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: JDev-unsubscribe (AT) jabber (DOT) org
_______________________________________________

-----BEGIN PGP SIGNATURE-----

iQIcBAEBAwAGBQJIXm/XAAoJEMtRg9d5cXHkWDkP/0mR8zYAzmXGfNpcAN9EU27e
nlRcCVJqSdmZXweIOL2M6tiMOiUZLjFNANJBiVUrQ+92M8DL3O UgsESqVeYbKGv+
h5lq5QiIrNYkb2rsy/6SMWINFetHm9PbMzYclxovnEefsk3T3B9R0DfusOaSCwhN
q2hzj/utWwae/JcVz51XMnT97+rTSgotuHrQjfmo0JIhgaScfU7uSG0aeVWaRUR L
CuRkhrP8/Qo7aPU+6VkNOEkFFdQAZFOEgIdtHKcx3p46hprw2kjxPQBxQVK G69u/
LMnd+XiNTFHF1B/YxFgno3ldmQQQFk/kJEDMRGtiPLFnfP0jK7OFizSHegoPEnDQ
Si9RPtpLtM/fxgmzvTctUhRAK8Jv1XPLVSw6ritYTXnsQ0U8H3hu0YG81YpPM Ef5
OjQudBkpESmY3uSxyiShfg06Q6TWnYl9hOTEsuVfL2RySTSNB9 z2EhYjhV+fCSg/
bWUVMC54de7gcqaEslQsMIjcx5Zppwvj13lOmki1/7zx7Ra0YO93CwDQ/y9ckaEZ
ecvU9zxRrJ9+VjmTdaphe2kwBOEr5Ux+fNngL673eKgmH8Qhth s2ASvIOLLDabx8
RP36hglKXgyvQ8o0tKwGTWByCl5xp6iFmgxCtiZxeM16e/LojNBQWoUAL9pJnk6z
CJ3N9zsHdRtzkfhdXIkD
=xXNM
-----END PGP SIGNATURE-----