tigase / tigase-server

(M) Highly optimized, extremely modular and very flexible XMPP/Jabber server
https://tigase.net
GNU Affero General Public License v3.0
322 stars 107 forks source link

vCard problem in MUC Rooms #28

Open Neustradamus opened 4 years ago

Neustradamus commented 4 years ago

On a Tigase MUC Room, when we look the user information, we obtain:

1/ Using "Multi User Chat 2.1.0-SNAPSHOT-b129/9e80625d / Linux-amd64-4.4.0-1105-aws, OpenJDK 64-Bit Server VM-12.0.1 AdoptOpenJDK"

2/ Conversations and fork users:

Unable to retrieve information about this contact. Reason: Feature not implemented. The feature requested is not implemented by the recipient or server and therefore cannot be processed.

3/ Gajim users:

Unable to retrieve information about this contact. Reason: Feature not implemented. The feature requested is not implemented by the recipient or server and therefore cannot be processed. The feature requested is not implemented by the recipient or server and therefore cannot be processed.

4/ Poezio users:

Unable to retrieve information about this contact. Reason: Not allowed. The recipient or server does not allow any entity to perform the actions. Many destination resources detected.

5/ Psi user :

Unable to retrieve information about this contact. Reason: Request timed out

woj-tek commented 4 years ago

On a Tigase MUC Room, when we look the user information, we obtain:

What exactly do you mean "look for user information"? What stanza do you send? Are you referring to vCard support for MUC?

1/ Using "Multi User Chat 2.1.0-SNAPSHOT-b129/9e80625d / Linux-amd64-4.4.0-1105-aws, OpenJDK 64-Bit Server VM-12.0.1 AdoptOpenJDK"

This is quite old version - version 2.1.0 was released in 2012 (8 years ago! and you are using SNAPSHOT version so it's even older). Current stable version is tigase-muc-3.0.0 and vCard for MUC was added in current development version: tigase-muc-3.1.0 (currently SNAPSHOT) which is shipped with Tigase XMPP Server 8.1.0.

Neustradamus commented 4 years ago

@woj-tek Thanks for your reply, I have done screenshots:

woj-tek commented 4 years ago

Thank you for the details. It would he helpful to include information which members were affected but even without that we can assume this is caused by literal implementation of MUC specification Business Rules: IQ:

  1. If an occupant wants to send an IQ stanza to another user in a semi-anonymous room, the sender can direct the stanza to the recipient's occupant JID and the service SHOULD forward the stanza to the recipient's real JID. However, the MUC service MUST NOT reveal the sender's real JID to the recipient at any time, nor reveal the recipient's real JID to the sender.

So tigase-muc follows this and forwards vCard request to FullJID (this is the JID associated with particular occupant and majority of use-cases described in MUC specification warrant using FullJID, including Direct Messages -- and IQs are even more specific!). All the errors that you shared are returned by other servers, which most likely can't process such request. For example:

<iq type="get" id="aaeea" to="tigase@muc.tigase.org/Neustradamus">
<query xmlns="jabber:iq:version"/>
</iq>

<iq type="error" from="tigase@muc.tigase.org/Neustradamus" id="aaf0a" to="wo*a@tigase.org/atlantis/city/psi+">
    <vCard xmlns="vcard-temp"/>
        <error type="cancel">
            <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
        </error>
</iq>

This was returned by your server and not by Tigase.

Given, that MUC avatars are based on XEP-0153: vCard-Based Avatars and XEP-0054: vcard-temp which both states that BareJID should be used:

it retrieves the sender's full vCard in accordance with the protocol flow described in XEP-0054 (note that this request is sent to the user's bare JID, not full JID)

and:

A user may view another user's vCard by sending an IQ of type "get" to the other user's bare JID.

There are two solutions:

However, please keep in mind, that we are working hard on MIX implementation (and MIX-MUC compatibility layer) so this issue will mostly be irrelevant in the future.

Neustradamus commented 8 months ago

Dear @tigase team, @woj-tek, @hantu85, @arturhefczyc,

A this time, I have always the same base (but little change) instead of the XMPP client name/version/OS with or without time:


XEP-0045: Multi-User Chat

jabber:iq:version XEP-0092: Software Version

urn:xmpp:time XEP-0202: Entity Time

vcard-temp:x:update XEP-0153: vCard-Based Avatars

xml:lang XEP-0026: Internationalization (I18N)

XEP-0071: XHTML-IM

RFCs:


You can see the problem:

Tigase MUC Room:

<iq id="XXXXX-XXXX-XXXX" type="get" to="mucroom@muc.domain.tld/user">
<query xmlns="jabber:iq:version"/>
</iq>

<iq id="YYYYY-YYYY-YYYY" type="get" to="mucroom@muc.domain.tld/user">
<time xmlns="urn:xmpp:time"/>
</iq>

<iq id="ZZZZZ-ZZZZ-ZZZZ" type="get" to="mucroom@muc.domain.tld/user">
<vCard xmlns="vcard-temp"/>
</iq>

<iq from="mucroom@muc.domain.tld/user" xml:lang="en" id="XXXXX-XXXX-XXXX" type="result" to="me@domain.tld/xmppclient">
<query xmlns="jabber:iq:version">
<name>Multi User Chat</name>
<version>2.2.0-b142/5761d16e</version>
<os>Linux-amd64-4.14.214-160.339.amzn2.x86_64, OpenJDK 64-Bit Server VM-17.0.6 Eclipse Adoptium</os>
</query>
</iq>

<iq from="mucroom@muc.domain.tld/user" xml:lang="en" id="ZZZZZ-ZZZZ-ZZZZ" type="result" to="me@domain.tld/xmppclient">
<vCard xmlns="vcard-temp">
<PHOTO>
<BINVAL>BINVAL</BINVAL>
<TYPE>image/jpeg</TYPE>
</PHOTO>
</vCard>
</iq>

<iq from="mucroom@muc.domain.tld/user" xml:lang="en" id="XXXXX-XXXX-XXXX" type="result" to="me@domain.tld/xmppclient">
<query xmlns="jabber:iq:version">
<name>CLIENTNAME</name>
<version>VERSION</version>
<os>OS</os>
</query>
</iq>

<iq from="mucroom@muc.domain.tld/user" xml:lang="en" id="YYYYY-YYYY-YYYY" type="result" to="me@domain.tld/xmppclient">
<time xmlns="urn:xmpp:time">
<utc>YYYY-MM-DDT00:00:00.000Z</utc>
<tzo>+00:00</tzo>
</time>
</iq>

Another XMPP Server:

<iq id="XXXXX-XXXX-XXXX" type="get" to="mucroom@muc.domain.tld/user">
<query xmlns="jabber:iq:version"/>
</iq>

<iq id="YYYYY-YYYY-YYYY" type="get" to="mucroom@muc.domain.tld/user">
<time xmlns="urn:xmpp:time"/>
</iq>

<iq id="ZZZZZ-ZZZZ-ZZZZ" type="get" to="mucroom@muc.domain.tld/user">
<vCard xmlns="vcard-temp"/>
</iq>

<iq from="psi-dev@conference.jabber.ru/reload" xml:lang="en" id="ZZZZZ-ZZZZ-ZZZZ" type="result" to="me@domain.tld/xmppclient">
<vCard xmlns="vcard-temp">
<PHOTO>
<BINVAL>BINVAL</BINVAL>
<TYPE>image/jpeg</TYPE>
</PHOTO>
</vCard>
</iq>

<iq from="mucroom@muc.domain.tld/user" xml:lang="en" id="XXXXX-XXXX-XXXX" type="result" to="me@domain.tld/xmppclient">
<query xmlns="jabber:iq:version">
<name>CLIENTNAME</name>
<version>VERSION</version>
<os>OS</os>
</query>
</iq>

<iq from="mucroom@muc.domain.tld/user" xml:lang="en" id="YYYYY-YYYY-YYYY" type="result" to="me@domain.tld/xmppclient">
<time xmlns="urn:xmpp:time">
<tzo>+00:00</tzo>
<utc>YYYY-MM-DDT00:00:00Z</utc>
</time>
</iq>

Can you solve it?

Thanks in advance.

Neustradamus commented 8 months ago

Note about MIX:

<iq id="XXXXX-XXXX-XXXX" type="get" to="channel@mix.domain.tld/user">
<query xmlns="jabber:iq:version"/>
</iq>

<iq from="domain.tld/user" xml:lang="en" id="XXXXX-XXXX-XXXX" type="result" to="me@domain.tld/xmppclient">
<query xmlns="jabber:iq:version">
<name>Mediated Information eXchange</name>
<version>0.0.0</version>
<os>Linux-amd64-4.14.219-161.340.amzn2.x86_64, OpenJDK 64-Bit Server VM-17.0.9 Eclipse Adoptium</os>
</query>
</iq>