#1496 PubSub/PEP should return a proper error for payload-less publish

Reporter Jonas Schäfer
Owner Zash
Stars ★ (1)
  • Type-Defect
  • Status-Fixed
  • Priority-Medium
  • Milestone-0.11
  1. Jonas Schäfer on

    What steps will reproduce the problem? 1. Set up a server with a PubSub service (e.g. by loading pep) 2. Publish a PubSub item without any payload What is the expected output? A proper bad-request error with invalid-payload application-specific condition. What do you see instead? internal-server-error. What version of the product are you using? On what operating system? name='Prosody' version='0.11.2' os='Linux' (Debian stable) Please provide any additional information below. Reproducer IQ: <iq to="accountjid" type="set"> <pubsub xmlns="http://jabber.org/protocol/pubsub"> <publish node="testnode"> <item/> </publish> </pubsub> </iq>

  2. Jonas Schäfer on

    I filed https://github.com/xsf/xeps/pull/898 to make the wording in XEP-0060 clear.

  3. Zash on

    Thanks for the report. mod_pep and mod_pubsub both have a callback responsible for ensuring that the item really is an <item> with the correct xmlns. I'm adding a check for the correct number of child tags here, which should fix this this.

    • owner Zash
    • tags milestone=0.11 Status-Started
  4. Zash on

    Borked tagging

    • tags Milestone-0.11
  5. Zash on

    Fixed in https://hg.prosody.im/0.11/rev/657e61531b33

    • tags Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.