XEP-0198: Stream should be closed when 'h' value is to high.

This commit is contained in:
Guus der Kinderen 2018-02-02 18:15:45 +01:00
parent 7d4efafe4e
commit 7d781cb65a
1 changed files with 29 additions and 1 deletions

View File

@ -28,6 +28,12 @@
&fabio;
&dcridland;
&mwild;
<revision>
<version>1.5.5</version>
<date>2018-09-19</date>
<initials>gdk</initials>
<remark><p>Specify error conditions.</p></remark>
</revision>
<revision>
<version>1.5.4</version>
<date>2018-07-19</date>
@ -270,6 +276,11 @@
</failed>
]]></example>
<p>Note that a client SHALL only make at most one attempt to enable stream management. If a server receives a second &lt;enable/> element it SHOULD respond with a stream error, thus terminating the client connection.</p>
<example caption='Server returns error if client attempts to enable stream management more than once'><![CDATA[
<failed xmlns='urn:xmpp:sm:3'>
<unexpected-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</failed>
]]></example>
</section1>
<section1 topic='Acks' anchor='acking'>
@ -394,7 +405,13 @@
</failed>
]]></example>
<p>In both of these failure cases, the server SHOULD allow the client to bind a resource at this point rather than forcing the client to restart the stream negotiation process and re-authenticate.</p>
<p>If the former stream is resumed and the server still has the stream for the previously-identified session open at this time, the old stream SHOULD be terminated.</p>
<p>If the former stream is resumed and the server still has the stream for the previously-identified session open at this time, the server SHOULD send a 'conflict' stream error and close that stream.</p>
<example caption='Server closes old stream that was replaced by new'><![CDATA[
<stream:error>
<conflict xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
</stream:error>
</stream:stream>
]]></example>
<p>When a session is resumed, the parties proceed as follows:</p>
<ul>
<li>The sequence values are carried over from the previous session and are not reset for the new stream.</li>
@ -415,6 +432,17 @@
</failed>
]]></example>
<p>Stream management errors SHOULD be considered recoverable; however, misuse of stream management MAY result in termination of the stream.</p>
<p>When a remote entity acknowledges that it has handled a number of stanzas that is higher than the amount of stanzas that it was sent (by sending an 'h' value that is to high), the local entity SHOULD generate a stream error and close the stream:</p>
<example caption='Entity closes stream because peer acknowledges more stanzas than it was sent'><![CDATA[
<stream:error>
<undefined-condition xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
<handled-count-too-high xmlns='urn:xmpp:sm:3' h='10' send-count='8'/>
<text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-streams'>
You acknowledged 10 stanzas, but I only send you 8 so far.
</text>
</stream:error>
</stream:stream>
]]></example>
</section1>
<section1 topic='Stream Closure' anchor='closure'>