From 77c2f517c4787f5d4d40eb45a349168b3fdfe29e Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Tue, 2 Dec 2025 14:55:26 -0500 Subject: [PATCH] fix(sec): Overwrite ImageMagick's security policy to tighten it up --- bbb-install.sh | 113 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/bbb-install.sh b/bbb-install.sh index f902149..72ba626 100644 --- a/bbb-install.sh +++ b/bbb-install.sh @@ -126,6 +126,8 @@ main() { GL3_DIR=~/greenlight-v3 LTI_DIR=~/bbb-lti NGINX_FILES_DEST=/usr/share/bigbluebutton/nginx + IMAGE_MAGICK_DIR=/etc/ImageMagick-6 + OVERWRITE_IMAGE_MAGICK_POLICY=true CR_TMPFILE=$(mktemp /tmp/carriage-return.XXXXXX) printf '\n' > "$CR_TMPFILE" @@ -391,6 +393,117 @@ main() { install_greenlight_v3 fi + if [ "$OVERWRITE_IMAGE_MAGICK_POLICY" = true ]; then + echo "ATTENTION!!" + echo "Overwriting ImageMagick policy file (modifying the default configuration to seal security vectors)" + + # + # This is the imagemagick-provided https://imagemagick.org/source/policy-websafe.xml with + # minimal modifications required for bigbluebutton presentation conversion to work + + + cat < "$IMAGE_MAGICK_DIR/policy.xml" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +HERE + fi + bbb-conf --check }