mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-07 17:20:57 +01:00
Remove TEMPPATH, make sure PWD doesn't contain a blank
This commit is contained in:
parent
8518284795
commit
f0f8f3a318
@ -17197,8 +17197,11 @@ maketempf() {
|
|||||||
TEMPDIR=$(mktemp -d /tmp/testssl.XXXXXX)
|
TEMPDIR=$(mktemp -d /tmp/testssl.XXXXXX)
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
# for e.g. devices where we can't write to /tmp:
|
# for e.g. devices where we can't write to /tmp:
|
||||||
TEMPPATH=$PWD
|
if [[ $PWD =~ \ ]]; then
|
||||||
TEMPDIR=$(mktemp -d $PWD/testssl.XXXXXX) || exit $ERR_FCREATE
|
# We can't allow this as we haven't quoted all strings depending on it, see #1445
|
||||||
|
fatal "\$PWD contains a blank: \"$PWD\"" $ERR_FCREATE
|
||||||
|
fi
|
||||||
|
TEMPDIR=$(mktemp -d "PWD/testssl.XXXXXX") || exit $ERR_FCREATE
|
||||||
fi
|
fi
|
||||||
TMPFILE=$TEMPDIR/tempfile.txt || exit $ERR_FCREATE
|
TMPFILE=$TEMPDIR/tempfile.txt || exit $ERR_FCREATE
|
||||||
if [[ "$DEBUG" -eq 0 ]]; then
|
if [[ "$DEBUG" -eq 0 ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user