AnsweredAssumed Answered

Smack 4.2.0 sends 'ask' attribute in Roster.removeEntry not allowed by RFC6121

Question asked by cmeng on May 21, 2017
Latest reply on Jun 16, 2017 by cmeng

While testing aTalk, trying to remove a roster entry using the method below:

roster.removeEntry(entry);

 

Note: the entry is still pending subscription authorization from the contact.

 

Smack 4.2.0 sends an <query xmlns='jabber:iq:roster'> with 'ask' attribute in <item/> which is not allow as per RFC6121 document

 

================ RFC6121 section 2.1.2.2 extraction =================

2.1.2.2.  Ask Attribute

   The 'ask' attribute of the <item/> element with a value of

   "subscribe" is used to signal various subscription sub-states that

   include a "Pending Out" aspect as described under Section 3.1.2.

 

   A server SHOULD include the 'ask' attribute to inform the client of

   "Pending Out" sub-states.  A client MUST NOT include the 'ask'

   attribute in the roster sets it sends to the server, but instead MUST

   use presence stanzas of type "subscribe" and "unsubscribe" to manage

   such sub-states as described under Section 3.1.2.

 

========= SMACK Error Log ======================

05-21 16:59:33.441 D/SMACK: SENT (1): <iq id='w2HYF-301' type='set'><query xmlns='jabber:iq:roster'><item jid='abc123@atalk.org' name='abc123.atalk' subscription='remove' ask='subscribe'><group>atalk member</group></item></query></iq>

05-21 16:59:33.851 D/SMACK: RECV (1): <iq xml:lang='en' to='abc123@jabbim.com/atalk' from='abc123@jabbim.com' type='error' id='w2HYF-301'><query xmlns='jabber:iq:roster'><item ask='subscribe' subscription='remove' name='abc123.atalk' jid='abc123@atalk.org'><group>atalk member</group></item></query><error code='400' type='modify'><bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Possessing &apos;ask&apos; attribute is not allowed by RFC6121</text></error></iq>

Outcomes