Skip to content

Commit

Permalink
XEP-0060: Disallow & and ; in NodeIDs to allow use in URIs and refer …
Browse files Browse the repository at this point in the history
…to PRECIS Stringprep
  • Loading branch information
vanitasvitae committed Sep 15, 2020
1 parent c7166ab commit e69b525
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions xep-0060.xml
Expand Up @@ -49,6 +49,15 @@
&pgmillard;
&stpeter;
&ralphm;
<revision>
<version>1.20.0</version>
<date>2020-09-15</date>
<initials>ps</initials>
<remark>
<p>Correction: NodeIDs are stringprepped using PRECIS.</p>
<p>Disallow '&amp;' and ';' in NodeIDs to allow NodeIDs to be used in URIs.</p>
</remark>
</revision>
<revision>
<version>1.19.0</version>
<date>2020-08-16</date>
Expand Down Expand Up @@ -895,7 +904,7 @@ And by opposing end them?
<section2 topic='Addressing' anchor='addressing'>
<p>If a pubsub node is addressable, it MUST be addressable either (1) as a JID or (2) as the combination of a JID and a node. <note>These nodes are equivalent to those used in <cite>XEP-0030: Service Discovery</cite>.</note></p>
<section3 topic='JID' anchor='addressing-jid'>
<p>If a pubsub node is addressable as a JID, the NodeID MUST be the resource identifier, and MUST NOT be specified by the "user" portion (node identifier) of the JID (e.g. "domain.tld/NodeID" and "user@domain.tld/NodeID" are allowed; "NodeID@domain.tld" is not allowed <note>This rule does not apply to the root collection node, if any.</note>). JID addressing SHOULD be used when interacting with a pubsub node using a protocol that does not support the node attribute. For example, when a service makes it possible for entities to subscribe to nodes via presence, it would address nodes as JIDs. If a pubsub node is addressable as a JID, the pubsub service MUST ensure that the NodeID conforms to the Resourceprep profile of Stringprep as described in <cite>RFC 3920</cite>.</p>
<p>If a pubsub node is addressable as a JID, the NodeID MUST be the resource identifier, and MUST NOT be specified by the "user" portion (node identifier) of the JID (e.g. "domain.tld/NodeID" and "user@domain.tld/NodeID" are allowed; "NodeID@domain.tld" is not allowed <note>This rule does not apply to the root collection node, if any.</note>). JID addressing SHOULD be used when interacting with a pubsub node using a protocol that does not support the node attribute. For example, when a service makes it possible for entities to subscribe to nodes via presence, it would address nodes as JIDs. If a pubsub node is addressable as a JID, the pubsub service MUST ensure that the NodeID adheres to the requirements and fullfills the constraints of resourceparts as specified in <cite>RFC 7622 § 3.4</cite> with the additional constraint that the NodeID MUST NOT contain the characters '=' and ';'. This is to allow the NodeID to be used in URIs.</p>
<p>Consider the following example, in which the pubsub service is located at the hostname pubsub.shakespeare.lit.</p>
<example caption='Node addressed as domain.tld/NodeID'><![CDATA[
<iq to='pubsub.shakespeare.lit/news announcements'>
Expand All @@ -910,7 +919,7 @@ And by opposing end them?
]]></example>
</section3>
<section3 topic='JID+NodeID' anchor='addressing-jidnode'>
<p>If a pubsub node is addressable as a JID plus node, the NodeID MUST be the value of both the Service Discovery 'node' attribute and the pubsub 'node' attribute; i.e., for discovery purposes, a pubsub node is equivalent to a Service Discovery node. If a pubsub node is addressable as a JID plus node, the pubsub service SHOULD ensure that the NodeID conforms to the Resourceprep profile of Stringprep as described in <cite>RFC 3920</cite>.</p>
<p>If a pubsub node is addressable as a JID plus node, the NodeID MUST be the value of both the Service Discovery 'node' attribute and the pubsub 'node' attribute; i.e., for discovery purposes, a pubsub node is equivalent to a Service Discovery node. If a pubsub node is addressable as a JID plus node, the pubsub service SHOULD ensure that the NodeID adheres to the requirements and fullfills the constraints of resourceparts as specified in <cite>RFC 7622 § 3.4</cite> with the additional constraint that the NodeID MUST NOT contain the characters '=' and ';'. This is to allow the NodeID to be used in URIs.</p>
<p>Consider the following example, in which the (virtual) pubsub service is located at hamlet@denmark.lit.</p>
<example caption='Node addressed as JID+NodeID'><![CDATA[
<iq to='hamlet@denmark.lit'>
Expand Down

0 comments on commit e69b525

Please sign in to comment.