Projects tigase _server tigase-pubsub Issues #120
Empty element in POST payload is incorrectly parsed (#120)
Closed
wojciech.kapcia@tigase.net opened 3 years ago
Affected versions
tigase-server-8.1.0

PubSub node creation with empty <domains/> element:

<data>
    <node>chat/nod</node>
    <owner>admin@domain.com</owner>
    <pubsub prefix="true">
        <node_type>leaf</node_type>
        <deliver_payloads>1</deliver_payloads>
        <notify_config>0</notify_config>
        <persist_items>0</persist_items>
        <access_model>open</access_model>
        <publish_model>open</publish_model>
        <send_last_published_item>never</send_last_published_item>
        <domains/>
        <presence_based_delivery>0</presence_based_delivery>
        <notify_sub_aff_state>1</notify_sub_aff_state>
    </pubsub>
    <tigase prefix="true">
        <presence_expired>0</presence_expired>
        <allow_view_subscribers>1</allow_view_subscribers>
        <collection_items_odering>byUpdateDate</collection_items_odering>
    </tigase>
</data>

Results in incorrect pubsub node configuration:

<field type="text-multi" label="The domains allowed to access this node (blank for any)" var="pubsub#domains"><value>&lt;payload&gt;null&lt;/payload&gt;</value></field>
Andrzej Wójcik (Tigase) commented 3 years ago

I've fixed the issue in the PubSub repository in the master branch (REST API script for PubSub is part of the PubSub package).

wojciech.kapcia@tigase.net commented 3 years ago

Thank you. I also cherry-picked it to stable.

issue 1 of 1
Type
Bug
Priority
Minor
Assignee
Version
tigase-server-8.2.0, tigase-server-8.1.3
Spent time
1h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-pubsub#120
Please wait...
Page is in error, reload to recover