#373 Server won't accept muc#roomconfig without muc#roomconfig_whois

Reporter AlKorgun
Owner MattJ
Created
Updated
Stars ★★★ (3)  
Tags
  • Milestone-0.9
  • Priority-Medium
  • Type-Defect
  • Status-Accepted
  1. AlKorgun on

    Request: <iq xmlns="jabber:client" to="26250615_chat#9@conference.localhost" from="26250615@vk.localhost" type="set"> <query xmlns="http://jabber.org/protocol/muc#owner"> <x xmlns="jabber:x:data" type="submit"> <field var="FORM_TYPE" type="hidden"> <value>http://jabber.org/protocol/muc#roomconfig</value> </field> <field var="muc#roomconfig_membersonly" type="text-single"> <value>1</value> </field> </x> </query> </iq> Answer: <iq xmlns="jabber:component:accept" to="26250615@vk.localhost" type="error" id="4" from="26250615_chat#9@conference.localhost"> <error type="cancel"> <bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /> <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Invalid value for &apos;whois&apos;</text> </error> </iq> When field "muc#roomconfig_whois" added to the request - result is ok.

  2. MattJ on

    Hi, what version of Prosody are you using?

    Changes
    • owner MattJ
  3. AlKorgun on

    MWild1, 0.8.2

  4. MattJ on

    I need to confirm whether this issue occurs in 0.9 (I made some changes to config handling). Adding a milestone so I don't forget.

    Changes
    • tags Milestone-0.9
  5. damencho@sip-communicator.org on

    Confirmed with prosody 0.9.4 and 0.9.1.

  6. alex.marandon on

    Confirmed with 0.9.8. Having looked the code, the issue seems to remain in more recent branches. In plugins/muc/muc.lib.lua there's a check on the muc#roomconfig_whois: if not valid_whois[whois] then origin.send(st.error_reply(stanza, 'cancel', 'bad-request', "Invalid value for 'whois'")); return; end So this fails when whois is nil (field missing). Please also note that this would fail if whois was the string "none" because valid_whois is defined like this: local valid_whois = { moderators = true, anyone = true, } But XEP-0054 says "The _whois configuration option specifies whether the room is non-anonymous (a value of "anyone"), semi-anonymous (a value of "moderators"), or fully anonmyous (a value of "none", not shown here)." So it seems that valid_whois should include a "none" key.

  7. Zash on

    Is this still the case after #246 was fixed?

    Changes
    • tag Status-Accepted
  8. Zash on

    Just checked, this is fixed in 0.10.

New comment