Commit 7fbf507
committed
Fix connected/connecting semantics
In case a connection is established, but the stream negotiation has not
completed yet, a user may think that they can start sending data,
but this is not the case.
All of the following quotes originate in RFC6120.
As of Ch. 8:
> After a client and a server (or two servers) have completed stream
> negotiation, either party can send XML stanzas.
As of Ch. 7.3.1:
> The parties to a stream MUST consider resource binding as
> mandatory-to-negotiate.
As of Ch. 6.3.1:
> The parties to a stream MUST consider SASL as mandatory-to-negotiate.
As of Ch. 4.3.5:
> The initiating entity MUST NOT attempt to send XML stanzas to entities
> other than itself (i.e., the client's connected resource or any other
> authenticated resource of the client's account) or the server to which
> it is connected until stream negotiation has been completed.
> Even if the initiating entity does attempt to do so, the receiving
> entity MUST NOT accept such stanzas and MUST close the stream with a
> <not-authorized/> stream error [...]
Signed-off-by: Steffen Jaeckel <[email protected]>1 parent 69f4236 commit 7fbf507
4 files changed
+29
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
819 | | - | |
| 819 | + | |
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
210 | | - | |
| 211 | + | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
| |||
864 | 865 | | |
865 | 866 | | |
866 | 867 | | |
867 | | - | |
868 | | - | |
869 | | - | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
870 | 872 | | |
871 | 873 | | |
872 | 874 | | |
| |||
960 | 962 | | |
961 | 963 | | |
962 | 964 | | |
| 965 | + | |
963 | 966 | | |
964 | 967 | | |
965 | 968 | | |
| |||
1028 | 1031 | | |
1029 | 1032 | | |
1030 | 1033 | | |
1031 | | - | |
| 1034 | + | |
1032 | 1035 | | |
1033 | 1036 | | |
1034 | 1037 | | |
| |||
1222 | 1225 | | |
1223 | 1226 | | |
1224 | 1227 | | |
1225 | | - | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
1226 | 1238 | | |
1227 | 1239 | | |
1228 | 1240 | | |
1229 | | - | |
| 1241 | + | |
1230 | 1242 | | |
1231 | 1243 | | |
1232 | 1244 | | |
1233 | 1245 | | |
1234 | 1246 | | |
1235 | | - | |
| 1247 | + | |
1236 | 1248 | | |
1237 | 1249 | | |
1238 | 1250 | | |
| |||
1793 | 1805 | | |
1794 | 1806 | | |
1795 | 1807 | | |
1796 | | - | |
| 1808 | + | |
1797 | 1809 | | |
1798 | 1810 | | |
1799 | 1811 | | |
| |||
1880 | 1892 | | |
1881 | 1893 | | |
1882 | 1894 | | |
1883 | | - | |
| 1895 | + | |
1884 | 1896 | | |
1885 | 1897 | | |
1886 | 1898 | | |
| |||
1928 | 1940 | | |
1929 | 1941 | | |
1930 | 1942 | | |
1931 | | - | |
| 1943 | + | |
1932 | 1944 | | |
1933 | 1945 | | |
1934 | 1946 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
180 | | - | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| |||
0 commit comments