Closed ShamrockLee closed 3 years ago
Use local build_file="$(mktemp -t "optparse-XXXXXX.tmp")" to create the temp file and to send back the file path
local build_file="$(mktemp -t "optparse-XXXXXX.tmp")"
This is similar to
local build_file=${TMPDIR:-/tmp}/optparse-$RANDOM.tmp touch $build_file chmod 600 $build_file
but avoids some vulnerabilities.
Use
local build_file="$(mktemp -t "optparse-XXXXXX.tmp")"
to create the temp file and to send back the file pathThis is similar to
but avoids some vulnerabilities.