From 9475423c5918ad5ef7db2ac5db029dc59ce8b355 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Sat, 14 Nov 2020 08:31:45 -0500 Subject: [PATCH] XEP-0389: error if client selects an invalid flow --- xep-0389.xml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/xep-0389.xml b/xep-0389.xml index 2ed6b78d..0ed61eb4 100644 --- a/xep-0389.xml +++ b/xep-0389.xml @@ -371,7 +371,7 @@ ]]> - +

A client selects the registration or recovery feature for negotiation by replying with an element of the same name and namespace. @@ -384,6 +384,19 @@ ]]> +

+ If during stream initialization the client attempts to select a flow that + does not match one of the flows sent by the server, the server MUST + respond with an "undefined-condition" stream error containing an + "invalid-flow" application error qualified by the 'urn:xmpp:register:0' + namespace. +

+ + + + +]]>

If the client is initiating registration or recovery after a stream has already been initiated it uses the same registration element wrapped in an @@ -396,7 +409,21 @@ ]]>

- The server then replies to the IQ or feature selection with a challenge. + If the client attempts to select a flow that does not match one of the + flows sent by the server in response to an IQ after stream initialization + the server MUST respond with a stanza error of type "item-not-found". +

+ + + + +]]> +
+ +

+ If a valid flow is selected by the client the server then replies to the + IQ or feature selection with a challenge. If replying to an IQ, the challenge must be wrapped in an IQ of type "result". Challenges take the form of a <challenge/> element qualified by the