Merge pull request #12163 from gustavotrott/soffice-conversion-security-fix2
Minor enhancement in Libreoffice conversion scripts
This commit is contained in:
commit
0f1433efeb
@ -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}"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user