Skip to content

Commit f40a8d5

Browse files
kevinconwaysaghul
authored andcommitted
jicofo: Handle special characters in password
Add quotations to jicofo run script. This fixes jitsi#488 where jicofo fails to start due to special characters. For example, if the JICOFO_AUTH_PASSWORD variable value contains `&` or `#` then the run script fails because the characters are interpreted by bash rather than as a string. Note that the `gen-passwords.sh` script does _not_ trigger this issue because it does not generate characters outside the ASCII alpha-numeric range. This only shows up when using other tools to generate the password values that do include special characters in the output or when setting the password values by hand.
1 parent 6f56e5b commit f40a8d5

File tree

1 file changed

+1
-1
lines changed
  • jicofo/rootfs/etc/services.d/jicofo

1 file changed

+1
-1
lines changed

jicofo/rootfs/etc/services.d/jicofo/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
JAVA_SYS_PROPS="-Djava.util.logging.config.file=/config/logging.properties -Dconfig.file=/config/jicofo.conf"
44
DAEMON=/usr/share/jicofo/jicofo.sh
55
DAEMON_DIR=/usr/share/jicofo/
6-
DAEMON_OPTS="--domain=$XMPP_DOMAIN --host=$XMPP_SERVER --user_name=$JICOFO_AUTH_USER --user_domain=$XMPP_AUTH_DOMAIN --user_password=$JICOFO_AUTH_PASSWORD"
6+
DAEMON_OPTS="--domain=\"$XMPP_DOMAIN\" --host=\"$XMPP_SERVER\" --user_name=\"$JICOFO_AUTH_USER\" --user_domain=\"$XMPP_AUTH_DOMAIN\" --user_password=\"$JICOFO_AUTH_PASSWORD\""
77

88
exec s6-setuidgid jicofo /bin/bash -c "cd $DAEMON_DIR; JAVA_SYS_PROPS=\"$JAVA_SYS_PROPS\" exec $DAEMON $DAEMON_OPTS"

0 commit comments

Comments
 (0)