Projects tigase _server server-core Issues #1285
Wrong field type for XEP-0157 entries (#1285)
wojciech.kapcia@tigase.net opened 3 years ago

Ref: https://github.com/tigase/tigase-server/issues/112:


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

wojciech.kapcia@tigase.net commented 3 years ago

I opted for relatively simple change in API to allow adding proper list-multi fields. Though, proper rework of DataForm/Command should be made but that can be done in 8.3/9.0 (#issue #1291)

Andrzej Wójcik (Tigase) commented 3 years ago

I've found that changes from this task in ServerInfoVHostItemExtension class were causing issues reported in http-119. I've reverted changes which were causing this issue and I think those were actually made by mistake. I've pushed changes in the separate branch issue #1285.

wojciech.kapcia@tigase.net commented 3 years ago

You are right - I overeagerly also changed method from VHostItemExtensionIfc which indeed is responsible for editing.

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