From 583a9841e50846ca702d2c65639366d4f45b4a90 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Tue, 17 Jun 2025 12:34:28 -0400 Subject: [PATCH] OpenCloud: fix sed to escape potential ampersand in secret --- install/opencloud-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/opencloud-install.sh b/install/opencloud-install.sh index 8c120e44..487e7357 100644 --- a/install/opencloud-install.sh +++ b/install/opencloud-install.sh @@ -167,7 +167,7 @@ useradd -r -M -s /usr/sbin/nologin opencloud chown -R opencloud:opencloud "$CONFIG_DIR" "$DATA_DIR" sudo -u opencloud opencloud init --config-path "$CONFIG_DIR" --insecure no OPENCLOUD_SECRET="$(sed -n '/jwt/p' "$CONFIG_DIR"/opencloud.yaml | awk '{print $2}')" -sed -i "s/JWT_SECRET=/&${OPENCLOUD_SECRET}/" "$ENV_FILE" +sed -i "s/JWT_SECRET=/&${OPENCLOUD_SECRET//&/\\&}/" "$ENV_FILE" systemctl enable -q --now coolwsd opencloud opencloud-wopi msg_ok "Configured ${APPLICATION}"