#366 [Pubsub] Traceback when 'jid' is missing from subscription request

Reporter lloydwatkin
Owner Zash
Created
Updated
Stars ★ (1)  
Tags
  • Milestone-0.9
  • Status-Fixed
  • Type-Defect
  • Priority-Medium
  • mod_pubsub
  1. lloydwatkin on

    *What steps will reproduce the problem?* 1. Create a pubsub node 2. Login as anonymous user 3. Attempt to subscribe *What is the expected output? What do you see instead?* Either 'subscribed' or error response *What version of the product are you using? On what operating system?* Ubuntu 13.04, Prosody 0.9 nightly build 162 (2013-09-30) *Please provide any additional information below.* Error log generated: Oct 04 19:55:00 mod_c2s error Traceback[c2s]: /usr/lib/prosody/util/pubsub.lua:127: table index is nil stack traceback: /usr/lib/prosody/util/pubsub.lua:127: in function 'add_subscription' /usr/lib/prosody/modules/mod_pubsub.lua:150: in function 'handler' /usr/lib/prosody/modules/mod_pubsub.lua:30: in function '?' /usr/lib/prosody/util/events.lua:67: in function </usr/lib/prosody/util/events.lua:63> (tail call): ? /usr/lib/prosody/modules/mod_iq.lua:70: in function '?' /usr/lib/prosody/util/events.lua:67: in function 'fire_event' /usr/lib/prosody/core/stanza_router.lua:184: in function 'core_post_stanza' /usr/lib/prosody/core/stanza_router.lua:132: in function </usr/lib/prosody/core/stanza_router.lua:55> (tail call): ? ... [C]: in function 'parse' /usr/lib/prosody/util/xmppstream.lua:185: in function 'feed' /usr/lib/prosody/modules/mod_c2s.lua:230: in function 'data' /usr/lib/prosody/modules/mod_c2s.lua:252: in function </usr/lib/prosody/modules/mod_c2s.lua:249> (tail call): ? /usr/lib/prosody/net/server_select.lua:847: in function </usr/lib/prosody/net/server_select.lua:829> [C]: in function 'xpcall' /usr/bin/prosody:372: in function 'loop' /usr/bin/prosody:402: in main chunk [C]: ?

  2. lloydwatkin on

    Logging in as a standard user allows me to subscribe ok

  3. MattJ on

    As discussed in the chatroom: the problem is a missing 'jid' attribute on the stanza, required by the XEP. We need to fail gracefully with an error reply...

    Changes
    • owner MattJ
    • title [Pubsub] Traceback when 'jid' is missing from subscription request
    • tags Milestone-0.9 Status-Accepted
  4. Zash on

    Changes
    • tag mod_pubsub
  5. Zash on

    Shouldn't this have been fixed by <http://hg.prosody.im/0.9/rev/989acb4ad1de> about 8 months before this?

  6. Zash on

    I can reproduce the traceback in https://hg.prosody.im/0.9/rev/86fab046813f I get an iq error response in https://hg.prosody.im/0.9/rev/989acb4ad1de Closing this.

    Changes
    • owner MattJ Zash
    • tags Status-Fixed

New comment