Tinder

Don't set variable and label by adding a new field to a DataForm

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.0 - Initial Release
  • Fix Version/s: 1.1 - Concurrency
  • Component/s: None
  • Labels:
    None
  • Acceptance Test - Add?:
    No

Description

The org.xmpp.forms.DataForm#addField(String variable, String label, FormField.Type type) doesn't work. The method adds a FormField to the DataForm but without setting up the variable and label. This is caused by two wrong checks which would be corrected by the attached patch. This bug prevents users of the actual Openfire trunk version to configure Multi-User Chat rooms.

Issue Links

Activity

Hide
Guenther Niess added a comment -

I'm not sure if these checks are necessary since they will be checked twice, in org.xmpp.forms.DataForm#addField(String, String, FormField.Type) and in org.xmpp.forms.FormField. But nevertheless I will write a unit test for the DataForm which prevents bugs like these.

Show
Guenther Niess added a comment - I'm not sure if these checks are necessary since they will be checked twice, in org.xmpp.forms.DataForm#addField(String, String, FormField.Type) and in org.xmpp.forms.FormField. But nevertheless I will write a unit test for the DataForm which prevents bugs like these.
Hide
Guenther Niess added a comment -

While I was writing the unit test I found the issues TINDER-11 and TINDER-12. I think the checks should be removed in org.xmpp.forms.FormField and corrected in org.xmpp.forms.DataForm.
The dataFormAddingFieldsTest patch test adding of valid fields (see XEP-0004) to Data Froms.

Show
Guenther Niess added a comment - While I was writing the unit test I found the issues TINDER-11 and TINDER-12. I think the checks should be removed in org.xmpp.forms.FormField and corrected in org.xmpp.forms.DataForm. The dataFormAddingFieldsTest patch test adding of valid fields (see XEP-0004) to Data Froms.
Hide
Guus der Kinderen added a comment -

Good find. I've applied the fix and added the unit test.

Show
Guus der Kinderen added a comment - Good find. I've applied the fix and added the unit test.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: