Software /
code /
prosody
Annotate
spec/scansion/server_contact_info.scs @ 12446:e54b8a5e35ad 0.12
util.random: Test whether util.crand works before using it (fix #1734)
util.crand can be configured at compile time to use the Linux
getrandom() system call, available from Linux 3.17, but it is still
possible to load it with an older kernel lacking that system call, where
attempting to use it throws an ENOSYS error.
By testing for this on load we can fall back to /dev/urandom in this
case.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 02 Apr 2022 16:33:27 +0200 |
parent | 11583:4ee7a6a8753e |
rev | line source |
---|---|
10848
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 # XEP-0157: Contact Addresses for XMPP Services |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 # mod_server_contact_info |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 [Client] Romeo |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 jid: romeo@localhost |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 password: password |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 ----- |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 Romeo connects |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 Romeo sends: |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 <iq type='get' id='lx2' to='localhost'> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 <query xmlns='http://jabber.org/protocol/disco#info'/> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 </iq> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
16 |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
17 # Ignore other disco#info features, identities etc |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
18 |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
19 Romeo receives: |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 <iq from='localhost' id='lx2' type='result'> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
21 <query xmlns='http://jabber.org/protocol/disco#info' scansion:strict='false'> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
22 <x xmlns='jabber:x:data' type='result'> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
23 <field type='hidden' var='FORM_TYPE'> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
24 <value>http://jabber.org/network/serverinfo</value> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
25 </field> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
26 <field type='list-multi' var='abuse-addresses'> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
27 <value>mailto:abuse@localhost</value> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
28 <value>xmpp:abuse@localhost</value> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
29 </field> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
30 <field type='list-multi' var='admin-addresses'> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
31 <value>mailto:admin@localhost</value> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
32 <value>xmpp:admin@localhost</value> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
33 </field> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
34 <field type='list-multi' var='feedback-addresses'> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
35 <value>http://localhost/feedback.html</value> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
36 <value>mailto:feedback@localhost</value> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
37 <value>xmpp:feedback@localhost</value> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
38 </field> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
39 <field type='list-multi' var='sales-addresses'> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
40 <value>xmpp:sales@localhost</value> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
41 </field> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
42 <field type='list-multi' var='security-addresses'> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
43 <value>xmpp:security@localhost</value> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
44 </field> |
11010
6b27cb706b89
mod_server_contact_info: Add status-addresses field
Kim Alvefur <zash@zash.se>
parents:
10848
diff
changeset
|
45 <field type='list-multi' var='status-addresses'> |
6b27cb706b89
mod_server_contact_info: Add status-addresses field
Kim Alvefur <zash@zash.se>
parents:
10848
diff
changeset
|
46 <value>gopher://status.localhost</value> |
6b27cb706b89
mod_server_contact_info: Add status-addresses field
Kim Alvefur <zash@zash.se>
parents:
10848
diff
changeset
|
47 </field> |
10848
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
48 <field type='list-multi' var='support-addresses'> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
49 <value>https://localhost/support.html</value> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
50 <value>xmpp:support@localhost</value> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
51 </field> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
52 </x> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
53 </query> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
54 </iq> |
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
55 |
11583
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
56 |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
57 Romeo sends: |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
58 <iq type='get' id='lx2' to='conference.localhost'> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
59 <query xmlns='http://jabber.org/protocol/disco#info'/> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
60 </iq> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
61 |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
62 <iq from='localhost' id='lx2' type='result'> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
63 <query xmlns='http://jabber.org/protocol/disco#info' scansion:strict='false'> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
64 <x xmlns='jabber:x:data' type='result'> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
65 <field type='hidden' var='FORM_TYPE'> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
66 <value>http://jabber.org/network/serverinfo</value> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
67 </field> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
68 <field type='list-multi' var='abuse-addresses'/> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
69 <field type='list-multi' var='admin-addresses'> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
70 <value>xmpp:admin@localhost</value> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
71 </field> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
72 <field type='list-multi' var='feedback-addresses'/> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
73 <field type='list-multi' var='sales-addresses'/> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
74 <field type='list-multi' var='security-addresses'/> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
75 <field type='list-multi' var='status-addresses'/> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
76 <field type='list-multi' var='support-addresses'/> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
77 </x> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
78 </query> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
79 </iq> |
4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
Kim Alvefur <zash@zash.se>
parents:
11010
diff
changeset
|
80 |
10848
7fd8976d47d7
scansion: Add test for mod_server_contact_info / XEP-0157
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
81 Romeo disconnects |