Merge pull request #12163 from gustavotrott/soffice-conversion-security-fix2

Minor enhancement in Libreoffice conversion scripts
This commit is contained in:
Anton Georgiev 2021-04-26 17:34:24 -04:00 committed by GitHub
commit 0f1433efeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -23,8 +23,8 @@ fi;
mkdir -p "/tmp/bbb-soffice-$(whoami)/"
tempDir="$(mktemp -d -p /tmp/bbb-soffice-$(whoami)/)"
source=${1}
dest=${2}
source="$1"
dest="$2"
#If output format is missing, define PDF
convertTo="${3:-pdf}"

View File

@ -21,12 +21,12 @@ elif (( $# == 1 )); then
fi;
source=${1}
dest=${2}
source="$1"
dest="$2"
#If output format is missing, define PDF
convertTo="${3:-pdf}"
curl -X POST "http://127.0.0.1:8080/lool/convert-to/$convertTo" -H "accept: application/octet-stream" -H "Content-Type: multipart/form-data" -F "data=@${source}" > ${dest}
curl -X POST "http://127.0.0.1:8080/lool/convert-to/$convertTo" -H "accept: application/octet-stream" -H "Content-Type: multipart/form-data" -F "data=@${source}" > "${dest}"
exit 0