Projects tigase _server server-core Issues #333
Server should stamp and/or override incomming stanzas with FullJID (#333)
wojciech.kapcia@tigase.net opened 1 decade ago

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 (<localpart@domainpart/resource>) 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

Artur Hefczyc commented 1 decade 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.

Igor Khomenko commented 1 decade 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

Artur Hefczyc commented 1 decade 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.

Artur Hefczyc commented 1 decade ago

Ok, I think this is not fixed through #2019

wojciech.kapcia@tigase.net commented 9 years ago

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.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
2003
Version
tigase-server-7.0.0
Spent time
19h 30m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#333
Please wait...
Page is in error, reload to recover