ejabberd - Comments for "IQ question" https://www.ejabberd.im/node/4744 en leeb wrote: Thanks once again https://www.ejabberd.im/node/4744#comment-57444 <div class="quote-msg"> <div class="quote-author"><em>leeb</em> wrote:</div> <p>Thanks once again badlop, wish I had spotted that!</p> <p>I notice that I can send IQs of type result without the namespace attribute.</p></div> <p>That's because ejabberd doesn't check it right now. But maybe it does in the future, or other XMPP servers do, or other clients, etc.</p> <div class="quote-msg"> <div class="quote-author"><em>leeb</em> wrote:</div> <p>Is that valid? It is hard to understand the meaning of the RFC there.</p></div> <p>I don't know either. But you can be in the safe corner by always including your custom xmlns in my-custom-query element.</p> Tue, 07 Jun 2011 21:49:07 +0000 mfoss comment 57444 at https://www.ejabberd.im Thanks once again badlop, https://www.ejabberd.im/node/4744#comment-57442 <p>Thanks once again badlop, wish I had spotted that!</p> <p>I notice that I can send IQs of type result without the namespace attribute. Is that valid? It is hard to understand the meaning of the RFC there.</p> Tue, 07 Jun 2011 15:40:30 +0000 leeb comment 57442 at https://www.ejabberd.im ejabberd 2.1.6 verifies IQ a https://www.ejabberd.im/node/4744#comment-57441 <p>ejabberd 2.1.6 verifies IQ a little more than older versions, and some invalid IQs may not be allowed anymore, see <noindex><a href="https://support.process-one.net/browse/EJAB-1320" title="https://support.process-one.net/browse/EJAB-1320" rel="nofollow" >https://support.process-one.net/browse/EJAB-1320</a></noindex></p> <p>Your Iq element has as invalid child element, see <noindex><a href="http://tools.ietf.org/html/rfc6120#section-8.4" title="http://tools.ietf.org/html/rfc6120#section-8.4" rel="nofollow" >http://tools.ietf.org/html/rfc6120#section-8.4</a></noindex></p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p> ... an IQ stanza of type "get" or "set" MUST contain one<br /> such child element. Such a child element MAY have any name and <strong>MUST<br /> possess a namespace declaration</strong> (other than "jabber:client", "jabber:<br /> server", or "http://etherx.jabber.org/streams") that defines the data<br /> contained within the child element. Such a child element is called<br /> an "extension element". An extension element can be included either<br /> at the direct child level of the stanza or in any mix of levels. </p></div> <p>I've added in your "child element" a namespace declaration, and now the stanza is delivered correctly to the other room occupant in my tests:</p> <div class="codeblock"><code>&lt;body rid=&#039;340429760&#039;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns=&#039;http://jabber.org/protocol/httpbind&#039;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sid=&#039;9f751cb790d7e0d728623329d8ede1a1520e1ac7&#039;&gt;<br />&nbsp; &lt;iq to=&#039;abc@conference.abc.com/test&#039;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id=&#039;4465:exec&#039;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#039;set&#039;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns=&#039;jabber:client&#039;&gt;<br />&nbsp;&nbsp;&nbsp; &lt;my-custom-query xmlns=&quot;jabber:iq:leeb&quot; /&gt;<br />&nbsp; &lt;/iq&gt;<br />&lt;/body&gt;</code></div> Tue, 07 Jun 2011 14:40:00 +0000 mfoss comment 57441 at https://www.ejabberd.im