Comparison

spec/scansion/muc_presence_probe.scs @ 11246:ab189e707705

MUC: Reject probes from non-occupants Also test for self-probes
author JC Brand <jc@opkode.com>
date Fri, 02 Oct 2020 16:12:47 +0200
parent 11245:43b43e7156b8
comparison
equal deleted inserted replaced
11245:43b43e7156b8 11246:ab189e707705
13 password: password 13 password: password
14 14
15 ----- 15 -----
16 16
17 Romeo connects 17 Romeo connects
18
19 # Romeo joins the MUC
18 20
19 Romeo sends: 21 Romeo sends:
20 <presence to="room@conference.localhost/Romeo"> 22 <presence to="room@conference.localhost/Romeo">
21 <x xmlns="http://jabber.org/protocol/muc"/> 23 <x xmlns="http://jabber.org/protocol/muc"/>
22 </presence> 24 </presence>
50 52
51 Romeo receives: 53 Romeo receives:
52 <iq id="config1" from="room@conference.localhost" type="result"> 54 <iq id="config1" from="room@conference.localhost" type="result">
53 </iq> 55 </iq>
54 56
55 # Juliet connects, and joins the room 57 # Romeo probes himself
58
59 Romeo sends:
60 <presence to="room@conference.localhost/Romeo" type="probe">
61 <x xmlns="http://jabber.org/protocol/muc"/>
62 </presence>
63
64 Romeo receives:
65 <presence from='room@conference.localhost/Romeo'>
66 <x xmlns='http://jabber.org/protocol/muc#user'>
67 <item jid="${Romeo's full JID}" affiliation='owner' role='moderator'/>
68 </x>
69 </presence>
70
71 # Juliet tries to probe Romeo before joining the room
72
56 Juliet connects 73 Juliet connects
74
75 Juliet sends:
76 <presence to="room@conference.localhost/Romeo" type="probe">
77 <x xmlns="http://jabber.org/protocol/muc"/>
78 </presence>
79
80 Juliet receives:
81 <presence from="room@conference.localhost/Romeo" type="error">
82 <error type="cancel">
83 <not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
84 </error>
85 </presence>
86
87 # Juliet tries to probe Mercutio (who's not in the MUC) before joining the room
88
89 Juliet sends:
90 <presence to="room@conference.localhost/Mercutio" type="probe">
91 <x xmlns="http://jabber.org/protocol/muc"/>
92 </presence>
93
94 Juliet receives:
95 <presence from="room@conference.localhost/Mercutio" type="error">
96 <error type="cancel">
97 <not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
98 </error>
99 </presence>
100
101 # Juliet joins the room
57 102
58 Juliet sends: 103 Juliet sends:
59 <presence to="room@conference.localhost/Juliet"> 104 <presence to="room@conference.localhost/Juliet">
60 <x xmlns="http://jabber.org/protocol/muc"/> 105 <x xmlns="http://jabber.org/protocol/muc"/>
61 </presence> 106 </presence>
77 <presence from='room@conference.localhost/Juliet'> 122 <presence from='room@conference.localhost/Juliet'>
78 <x xmlns='http://jabber.org/protocol/muc#user'> 123 <x xmlns='http://jabber.org/protocol/muc#user'>
79 <item jid="${Juliet's full JID}" affiliation='none' role='participant'/> 124 <item jid="${Juliet's full JID}" affiliation='none' role='participant'/>
80 </x> 125 </x>
81 </presence> 126 </presence>
127
128
129 # Mercutio tries to probe himself in a MUC before joining
130
131 Mercutio connects
132
133 Mercutio sends:
134 <presence to="room@conference.localhost/Mercutio" type="probe">
135 <x xmlns="http://jabber.org/protocol/muc"/>
136 </presence>
137
138 Mercutio receives:
139 <presence from="room@conference.localhost/Mercutio" type="error">
140 <error type="cancel">
141 <not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
142 </error>
143 </presence>
144
82 145
83 # Romeo makes Mercutio a member and registers his nickname 146 # Romeo makes Mercutio a member and registers his nickname
84 147
85 Romeo sends: 148 Romeo sends:
86 <iq id='member1' to='room@conference.localhost' type='set'> 149 <iq id='member1' to='room@conference.localhost' type='set'>