Projects tigase _server server-core Issues #522
Requesting version to own JID returns server version (#522)
Daniele Ricci opened 10 years ago
Due Date
2015-06-30

Is this intended behaviour?

D / SMACK    ( 9482): SENT (0): <iq to='SELFJID@beta.kontalk.net/eb2e56271013472f' id='WfN3ao' type='get'><query xmlns='jabber:iq:version'></query></iq>
D / SMACK    ( 9482): RECV (0): <iq type="result" id="WfN3ao" xmlns="jabber:client" to="SELFJID@beta.kontalk.net/eb2e56271013472f" from="SELFJID@beta.kontalk.net/eb2e56271013472f"><query xmlns="jabber:iq:version"><name>Tigase</name><version>7.0.2-b3845/104176fa (2015-06-10/20:38:52)</version><os>Linux-amd64-2.6.32-5-amd64, Java HotSpot(TM) 64-Bit Server VM-24.71-b01-Oracle Corporation</os></query></iq>

I think processFromUserToServerPacket is called for the wrong case here. What do you think? I'm afraid I can break some APIs here if I touch something so I'd like your opinion before adding a patch.

Tested on Tigase 7.0.2, but both classes (JabberIqVersion and its parent class) didn't change up to now.

JabberIqVersion-self.diff

Artur Hefczyc commented 10 years ago

What does the spec says about this use-case? It seems like, the Tigase processing might be indeed incorrect.

I just looked at the code and the method: processFromUserPacket might be to simplistic indeed. The XMPP routing logic is actually more complex and it also depends on the packet type. That is, it is a bit different for presence, message and iq. Therefore, the processFromUserPacket might not work well for all possible use-cases.

My suggestion to fix this error would be to reimplement the JabberIQVersion plugin and override the processFromUserPacket method instead to get a correct processing for version stanzas sent to the user himself (most likely the other connection).

Daniele Ricci commented 10 years ago

Thanks Artur, I'll begin working on JabberIqVersion as soon as I can and attach a patch to this issue.

Daniele Ricci commented 10 years ago

Isn't this enough to achive the goal?

Please set the source code disclaimer to yes for me.

Wojciech Kapcia (Tigase) commented 10 years ago

Applied in changeset commit:tigase-server|9918d2de.

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