tigase / tigase-server

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

Wrong field type for XEP-0157 entries #112

Closed Zash closed 3 years ago

Zash commented 3 years ago

The fields defined in XEP-0157 are defined as list-multi fields, but a Tigase instance I came across uses text-multi as below:

<x xmlns="jabber:x:data" type="result">
  <field var="FORM_TYPE" type="hidden">
    <value>http://jabber.org/network/serverinfo</value>
  </field>
  <field var="abuse-addresses" type="text-multi">
    <value>mailto:support@tigase.net</value>
    <value>xmpp:tigase@muc.tigase.im</value>
    <value>https://tigase.net/technical-support</value>
  </field>
</x>

text-multi is a bit awkward to use here since it means that the <values> are really individual lines of a single text field, rather than a list of strings.

Looks like it uses a function here:

https://github.com/tigase/tigase-server/blob/e1cc9196bd89550a3546f475db9cd44874a84925/src/main/java/tigase/server/BasicComponent.java#L625

that hardcodes text-multi here:

https://github.com/tigase/tigase-server/blob/e1cc9196bd89550a3546f475db9cd44874a84925/src/main/java/tigase/server/DataForm.java#L116-L117

woj-tek commented 3 years ago

Thank you for reporting.

(#server-1285)

woj-tek commented 3 years ago

Fixed and will be part of 8.2 release.