diff --git a/ct/opencloud.sh b/ct/opencloud.sh index 7e66fc9fb..9100f8ab0 100644 --- a/ct/opencloud.sh +++ b/ct/opencloud.sh @@ -31,6 +31,15 @@ function update_script() { exit fi + # Collabora 26.04.4 ignores frame-ancestors in content_security_policy; outside the release + # check so installs already on the current release get it too + if [[ -f /etc/coolwsd/coolwsd.xml ]] && ! grep -q ']*>[^<[:space:]]' /etc/coolwsd/coolwsd.xml; then + msg_info "Allowing OpenCloud to embed Collabora" + $STD sudo -u cool coolconfig set net.frame_ancestors "$(sed -n 's/^OC_URL=//p' /etc/opencloud/opencloud.env)" + systemctl restart coolwsd + msg_ok "Allowed OpenCloud to embed Collabora" + fi + RELEASE="v8.1.0" if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then OLD_VERSION="$(cat ~/.opencloud 2>/dev/null)" diff --git a/install/opencloud-install.sh b/install/opencloud-install.sh index ad9e67275..98b910d06 100644 --- a/install/opencloud-install.sh +++ b/install/opencloud-install.sh @@ -207,7 +207,7 @@ EOF $STD sudo -u cool coolconfig set ssl.enable false $STD sudo -u cool coolconfig set ssl.termination true $STD sudo -u cool coolconfig set ssl.ssl_verification true -sed -i "s|-Policy\">|&frame-ancestors https://${OPENCLOUD_FQDN}|" /etc/coolwsd/coolwsd.xml +$STD sudo -u cool coolconfig set net.frame_ancestors "https://${OPENCLOUD_FQDN}" 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