Project

General

Profile

Bug #2003

Server should stamp and/or override incomming stanzas with FullJID

Added by Wojciech Kapcia TigaseTeam over 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
2014-06-12
Due date:
% Done:

0%

Estimated time:
Database:
n/a
Applicable version:
git/devel
Source Code Disclaimer:

Description

As per RFC6120: 8.1.2.1. Client-to-Server Streams

When a server receives an XML stanza from a connected client, the server MUST add a 'from' attribute to the stanza or override the 'from' attribute specified by the client, where the value of the 'from' attribute MUST be the full JID () determined by the server for the connected resource that generated the stanza (see Section 4.3.6), or the bare JID (localpart@domainpart) in the case of subscription-related presence stanzas (see [XMPP‑IM]).

Related forum topic


Related issues

Related to Tigase XMPP Server - Bug #2019: 5.2.1 packet duplication in cluster environmentClosed2014-06-24

Associated revisions

Revision 47596e31 (diff)
Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 4 years ago

Fixes #2019 - added removal of unnecessary 'from' attribute on packets from client

Revision 0a58c5d6 (diff)
Added by Wojciech Kapcia TigaseTeam over 3 years ago

Server should stamp and/or override incomming stanzas with FullJID; #2003

History

#1 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam over 4 years ago

I distinctly remember that it was once setting full JID always for all stanzas and there was some problem. Unfortunately I do not remember details. So I changed the code to not modify from attribute in if there is a correct BareJID set already. Maybe it was related to presence subscription workflow? Attached RFC excerpt suggest that presence subscription should be treated differently.

#2 Updated by Igor Khomenko over 4 years ago

Artur Hefczyc wrote:

I distinctly remember that it was once setting full JID always for all stanzas and there was some problem. Unfortunately I do not remember details. So I changed the code to not modify from attribute in if there is a correct BareJID set already. Maybe it was related to presence subscription workflow? Attached RFC excerpt suggest that presence subscription should be treated differently.

Artur, how can I check your commit? Don't see any related info here https://projects.tigase.org/projects/tigase-server/repository/show?rev=devel

#3 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam over 4 years ago

This commit probably was quite a few years ago. I do not think you can easily find it. I think the correct action would be now to work on the code which replaces form address to work correctly, that is replace all message and iq stanzas and deal properly with presences.

#4 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam about 4 years ago

  • Status changed from New to Closed

Ok, I think this is not fixed through #2019

#5 Updated by Wojciech Kapcia TigaseTeam over 3 years ago

  • Source Code Disclaimer set to No

Artur Hefczyc wrote:

Ok, I think this is not fixed through #2019

Actually it wasn't for all connections - only for c2s (and thus ws2s), which surfaced in https://projects.tigase.org/boards/8/topics/4917?r=5114. Corrected the logic in tigase.xmpp.impl.BindResource.preProcess() which was responsible for setting correct from and added unit test.

Also available in: Atom PDF