Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHRAS-4056 -fix non escaped path error in sed #4524

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,14 @@ services:
- PHRASEANET_CMD_MODE
- PHRASEANET_EXPLODE_WORKER
- PHRASEANET_WORKERS_LAUNCH_METHOD
- IMAGEMAGICK_POLICY_VERSION
- IMAGEMAGICK_POLICY_WIDTH
- IMAGEMAGICK_POLICY_HEIGHT
- IMAGEMAGICK_POLICY_MAP
- IMAGEMAGICK_POLICY_MEMORY
- IMAGEMAGICK_POLICY_AREA
- IMAGEMAGICK_POLICY_DISK
- IMAGEMAGICK_POLICY_TEMPORARY_PATH
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
Expand Down
2 changes: 1 addition & 1 deletion docker/phraseanet/worker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if [ -f /usr/local/etc/ImageMagick-$IMAGEMAGICK_POLICY_VERSION/policy.xml ]; the
sed -i "s/domain=\"resource\" name=\"height\" value=\".*\"/domain=\"resource\" name=\"height\" value=\"$IMAGEMAGICK_POLICY_HEIGHT\"/g" /usr/local/etc/ImageMagick-$IMAGEMAGICK_POLICY_VERSION/policy.xml
sed -i "s/domain=\"resource\" name=\"disk\" value=\".*\"/domain=\"resource\" name=\"disk\" value=\"$IMAGEMAGICK_POLICY_DISK\"/g" /usr/local/etc/ImageMagick-$IMAGEMAGICK_POLICY_VERSION/policy.xml
sed -i "s/domain=\"resource\" name=\"area\" value=\".*\"/domain=\"resource\" name=\"area\" value=\"$IMAGEMAGICK_POLICY_AREA\"/g" /usr/local/etc/ImageMagick-$IMAGEMAGICK_POLICY_VERSION/policy.xml
sed -i "s/.*domain=\"resource\" name=\"temporary-path\" value=\".*/<domain=\"resource\" name=\"temporary-path\" value=\"\\$IMAGEMAGICK_POLICY_TEMPORARY_PATH\" \/\>/g" /usr/local/etc/ImageMagick-$IMAGEMAGICK_POLICY_VERSION/policy.xml
sed -i "s/.*domain=\"resource\" name=\"temporary-path\" value=\".*/<domain=\"resource\" name=\"temporary-path\" value=\"$(echo $IMAGEMAGICK_POLICY_TEMPORARY_PATH | sed "s/\//\\\\\//g")\" \/\>/g" /usr/local/etc/ImageMagick-$IMAGEMAGICK_POLICY_VERSION/policy.xml
fi

if [[ $NEWRELIC_ENABLED = "true" ]]; then
Expand Down
Loading