Project

General

Profile

Failed authorization when creating chat room

Troy Mestler
Added about 5 years ago

Hi,

I'm getting an auth: forbidden error when trying to create/configure a chat room, but for some reason I am still able to join the room and chat in it.

Here is the message chain. Could you please tell me what I'm doing wrong here?

Thanks.

Troy

To Server

<body xmlns="http://jabber.org/protocol/httpbind" rid="3972770321" sid="bcd01147-d806-4df6-8106-b539e69f9433">
   <iq xmlns="jabber:client" to="cc17@muc.chat.openf.in" type="get" from="user@chat.openf.in/tigase-262" id="3799:sendIQ">
      <query xmlns="http://jabber.org/protocol/muc#owner" />
   </iq>
</body>

From Server

<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0" secure="true" ack="3972770321" from="chat.openf.in">
   <iq xmlns="jabber:client" type="result" id="3799:sendIQ" from="cc17@muc.chat.openf.in" to="user@chat.openf.in/tigase-262">
      <query xmlns="http://jabber.org/protocol/muc#owner">
         <x xmlns="jabber:x:data" type="form">
            <field var="muc#roomconfig_roomname" label="Natural-Language Room Name" type="text-single">
               <value />
            </field>
            <field var="muc#roomconfig_roomdesc" label="Short Description of Room" type="text-single">
               <value />
            </field>
            <field var="muc#roomconfig_persistentroom" label="Make Room Persistent?" type="boolean">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_publicroom" label="Make Room Publicly Searchable?" type="boolean">
               <value>1</value>
            </field>
            <field var="muc#roomconfig_moderatedroom" label="Make Room Moderated?" type="boolean">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_membersonly" label="Make Room Members Only?" type="boolean">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_passwordprotectedroom" label="Password Required to Enter?" type="boolean">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_roomsecret" label="Password" type="text-single">
               <value />
            </field>
            <field var="muc#roomconfig_anonymity" label="Room anonymity level:" type="list-single">
               <value>semianonymous</value>
               <option label="Non-Anonymous Room">
                  <value>nonanonymous</value>
               </option>
               <option label="Semi-Anonymous Room">
                  <value>semianonymous</value>
               </option>
               <option label="Fully-Anonymous Room">
                  <value>fullanonymous</value>
               </option>
            </field>
            <field var="muc#roomconfig_changesubject" label="Allow Occupants to Change Subject?" type="boolean">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_enablelogging" label="Enable Public Logging?" type="boolean">
               <value>0</value>
            </field>
            <field var="logging_format" label="Logging format:" type="list-single">
               <value>html</value>
               <option label="HTML">
                  <value>html</value>
               </option>
               <option label="Plain text">
                  <value>plain</value>
               </option>
            </field>
            <field var="muc#maxhistoryfetch" label="Maximum Number of History Messages Returned by Room" type="text-single">
               <value>50</value>
            </field>
         </x>
      </query>
   </iq>
</body>

To Server

<body xmlns="http://jabber.org/protocol/httpbind" rid="3972770322" sid="bcd01147-d806-4df6-8106-b539e69f9433">
   <iq xmlns="jabber:client" to="cc17@muc.chat.openf.in" type="set" from="user@chat.openf.in/tigase-262" id="3800:sendIQ">
      <query xmlns="http://jabber.org/protocol/muc#owner">
         <x xmlns="jabber:x:data" type="submit">
            <field var="FORM_TYPE">
               <value>http://jabber.org/protocol/muc#roomconfig</value>
            </field>
            <field var="muc#roomconfig_roomname">
               <value>cc17</value>
            </field>
            <field var="muc#roomconfig_roomdesc">
               <value>cc17</value>
            </field>
            <field var="muc#roomconfig_persistentroom">
               <value>1</value>
            </field>
            <field var="muc#roomconfig_publicroom">
               <value>1</value>
            </field>
            <field var="muc#roomconfig_moderatedroom">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_membersonly">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_passwordprotectedroom">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_roomsecret">
               <value />
            </field>
            <field var="muc#roomconfig_anonymity">
               <value>non-anonymous</value>
            </field>
            <field var="muc#roomconfig_changesubject">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_enablelogging">
               <value>0</value>
            </field>
            <field var="logging_format">
               <value>html</value>
            </field>
            <field var="muc#maxhistoryfetch">
               <value>50</value>
            </field>
         </x>
      </query>
   </iq>
</body>

From Server

<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0" secure="true" ack="3972770322" from="chat.openf.in">
   <iq xmlns="jabber:client" type="error" id="3800:sendIQ" from="cc17@muc.chat.openf.in" to="user@chat.openf.in/tigase-262">
      <query xmlns="http://jabber.org/protocol/muc#owner">
         <x xmlns="jabber:x:data" type="submit">
            <field var="FORM_TYPE">
               <value>http://jabber.org/protocol/muc#roomconfig</value>
            </field>
            <field var="muc#roomconfig_roomname">
               <value>cc17</value>
            </field>
            <field var="muc#roomconfig_roomdesc">
               <value>cc17</value>
            </field>
            <field var="muc#roomconfig_persistentroom">
               <value>1</value>
            </field>
            <field var="muc#roomconfig_publicroom">
               <value>1</value>
            </field>
            <field var="muc#roomconfig_moderatedroom">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_membersonly">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_passwordprotectedroom">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_roomsecret">
               <value />
            </field>
            <field var="muc#roomconfig_anonymity">
               <value>non-anonymous</value>
            </field>
            <field var="muc#roomconfig_changesubject">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_enablelogging">
               <value>0</value>
            </field>
            <field var="logging_format">
               <value>html</value>
            </field>
            <field var="muc#maxhistoryfetch">
               <value>50</value>
            </field>
         </x>
      </query>
      <error code="403" type="auth">
         <forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
      </error>
   </iq>
</body>

Replies (2)

Added by Troy Mestler about 5 years ago

Hi All,

Any updates on this issue?

Thanks

Troy

Avatar?id=6098&size=32x32

Added by Bartosz Malkowski TigaseTeam about 5 years ago

It seems you found a bug. Congratulations!

Anyway this bug doesn't change anything to you. You just should receive two responses for your initial (id="3799:sendIQ") request.

In response to your request you received default room config:

If the room does not already exist, the service MUST return an initial room configuration form to the user.

You are able to join to room and chat, because room is created when you join to it.

You can confirm my assumptions by sending:

<iq 
    id='kl2fax27'
    to='cc17@muc.chat.openf.in'
    type='get'>
  <query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>

You should receive error item-not-found if room doesn't exists. Or you should receive list of participants or forbidden if room exists and you're not joined to room.

    (1-2/2)