mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-10 21:02:09 +02:00
OpenCloud: allow OpenCloud to embed Collabora on 26.04.4 (#17810)
Collabora 26.04.4 ignores frame-ancestors set in content_security_policy, so the editor iframe is blocked. Use net.frame_ancestors (as opencloud-compose does) on install, and add it on update when missing.
This commit is contained in:
@@ -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 '<frame_ancestors[^>]*>[^<[: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)"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user