1
votes

I would like to initiate a Chat between two users A and B from my web application. So I create an XMPP Message using Smack Client API or directly from an OpenFire Plugin:

  • Send a Message by Smack from A to B
  • Send a Message by Smack from Server to B with replyTo A

XEP-0033 allow "replyTo address" supported by OpenFire but not suported by IM Clients.

It seems "from" can't be overrided by a client or an OpenFire plugin. I also think GTalk will not accept an xmpp message from [email protected] to [email protected] by ServerToServer protocol.

Is there an other way to do this ? I want my web application to forge a message from UserA to UserB. But this webapp is not A or B.

Best Regards, Jp

1
What do you mean with send a message "by server"? Can you rephrase? thanks.Martín Schonaker
I tried to improve explanation. At the moment, I send a "fake" message from webapp to jabber then an OpenFire Plugin forge a message from A to B.Jean-Philippe Encausse

1 Answers

1
votes

Any XMPP server should ignore the from address in a stanza and stamp the one that it get's from the connection into the stanza it sends on. This is a specific feature of XMPP compliant servers and is used to stop address spoofing and spam etc. You'd probably have to edit the source of a server and change it's behaviour. This is dangerous though and I wouldn't reccomend it if you'll be federating with other servers.

J