Skip to content

Commit ba7c817

Browse files
committed
ejabberd: Improve install wizard user experience
- Split wizard into two logical steps: Administrator Account and Server Domain - Add introductory descriptions explaining ejabberd and XMPP - Improve field labels for consistency with upgrade wizard - Remove insecure default password (admin) - Add minimum password length validation (4 characters) - Clarify username format and login instructions - Quote variables in register command to support passwords with spaces Password validation follows XMPP ResourcePrep (RFC 6122) - special characters are allowed; only non-printable and control characters are prohibited.
1 parent b26cedc commit ba7c817

File tree

2 files changed

+59
-38
lines changed

2 files changed

+59
-38
lines changed

spk/ejabberd/src/service-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ service_postinst ()
114114
${EJABBERD_CTL} start
115115
${EJABBERD_CTL} started
116116

117-
${EJABBERD_CTL} register ${wizard_ejabberd_admin_username} ${wizard_ejabberd_hostname} ${wizard_ejabberd_admin_password}
117+
${EJABBERD_CTL} register "${wizard_ejabberd_admin_username}" "${wizard_ejabberd_hostname}" "${wizard_ejabberd_admin_password}"
118118

119119
${EJABBERD_CTL} stop
120120
${EJABBERD_CTL} stopped
Lines changed: 58 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,60 @@
1-
[{
2-
"step_title": "ejabberd Configuration",
3-
"items": [{
4-
"type": "textfield",
5-
"desc": "Administrator account.",
6-
"subitems": [{
7-
"key": "wizard_ejabberd_admin_username",
8-
"desc": "Account",
9-
"defaultValue": "admin",
10-
"validator": {
11-
"allowBlank": false
1+
[
2+
{
3+
"step_title": "ejabberd Administrator Account",
4+
"items": [
5+
{
6+
"desc": "ejabberd is an XMPP server for instant messaging. Configure the administrator account for the web admin interface."
7+
},
8+
{
9+
"type": "textfield",
10+
"desc": "Administrator username (without @domain)",
11+
"subitems": [
12+
{
13+
"key": "wizard_ejabberd_admin_username",
14+
"desc": "Username",
15+
"defaultValue": "admin",
16+
"validator": {
17+
"allowBlank": false
18+
}
19+
}
20+
]
21+
},
22+
{
23+
"type": "password",
24+
"desc": "Administrator password (minimum 4 characters)",
25+
"subitems": [
26+
{
27+
"key": "wizard_ejabberd_admin_password",
28+
"desc": "Password",
29+
"validator": {
30+
"allowBlank": false,
31+
"minLength": 4
32+
}
33+
}
34+
]
1235
}
13-
}]
14-
}, {
15-
"type": "password",
16-
"desc": "Administrator's password. Special characters are not supported.",
17-
"subitems": [{
18-
"key": "wizard_ejabberd_admin_password",
19-
"desc": "Password of Administrator (default is admin).",
20-
"defaultValue": "admin",
21-
"validator": {
22-
"allowBlank": false
36+
]
37+
},
38+
{
39+
"step_title": "ejabberd Server Domain",
40+
"items": [
41+
{
42+
"desc": "Configure the XMPP domain for this server. Users will log in with username@domain (e.g., admin@localhost)."
43+
},
44+
{
45+
"type": "textfield",
46+
"desc": "XMPP domain",
47+
"subitems": [
48+
{
49+
"key": "wizard_ejabberd_hostname",
50+
"desc": "Domain",
51+
"defaultValue": "localhost",
52+
"validator": {
53+
"allowBlank": false
54+
}
55+
}
56+
]
2357
}
24-
}]
25-
}, {
26-
"type": "textfield",
27-
"desc": "Served hostname.",
28-
"subitems": [{
29-
"key": "wizard_ejabberd_hostname",
30-
"desc": "Domain",
31-
"defaultValue": "localhost",
32-
"validator": {
33-
"allowBlank": false
34-
}
35-
}]
36-
}, {
37-
"desc": "Note: To log in, use 'account@domain' (default: admin@localhost)"
38-
}]
39-
}]
58+
]
59+
}
60+
]

0 commit comments

Comments
 (0)