Consistent behavior for "from" attribute on outgoing stanzas

Description

According to http://xmpp.org/rfcs/rfc6120.html#stanzas-attributes-from-c2s the server must ignore the from field in stanzas it receives from the client, and replace it with the client's full JID. This means, a client may or may not send the from field (set to its own full JID).

In SMACK, the packet.setFrom() function is responsible for that. However, it is not consequently used on outgoing packets. Some IQ replies contain a from address, others do not.

The behavior should be made consistent by removing setFrom() from all individual places it is used. Further, it might be useful to add a global option to set the from field on all outgoing packets, which would be enforced in a central place (like maybe PacketWriter).

Environment

None

Activity

Show:

Georg February 20, 2014 at 11:19 AM

In a discussion on the XSF MUC it was outlined that a server may reject stanzas from a client, if the client provides an invalid from field (which might be caused by misconfiguration or miscommunication when binding the session). This is specified in https://tools.ietf.org/html/rfc6120#section-4.9.3.9 - therefore my strong vote is to completely omit setting the from field on outgoing stanzas.

Fixed

Details

Assignee

Reporter

Expected Effort

Medium

Components

Fix versions

Priority

Created February 20, 2014 at 10:44 AM
Updated August 17, 2014 at 1:11 PM
Resolved April 14, 2014 at 6:46 PM