mirror of
https://github.com/ben-grande/qusal.git
synced 2025-05-02 22:34:53 -04:00
fix: avoid operand evaluation as argument
Explicit end option parsing as the shell can be quite dangerous without it.
This commit is contained in:
parent
e42950376a
commit
1b2f1ba941
52 changed files with 196 additions and 189 deletions
|
@ -23,7 +23,7 @@ if test -z "${untrusted_repo}"; then
|
|||
die "Repository name is empty"
|
||||
fi
|
||||
|
||||
if ! (echo "${untrusted_repo}" | grep -q "^[A-Za-z0-9][A-Za-z0-9_.-]\+$")
|
||||
if ! (echo "${untrusted_repo}" | grep -q -e "^[A-Za-z0-9][A-Za-z0-9_.-]\+$")
|
||||
then
|
||||
msg="Forbidden characters in agent name."
|
||||
msg="${msg} Allowed chars: letters, numbers, hyphen, underscore and dot."
|
||||
|
@ -64,7 +64,7 @@ fi
|
|||
|
||||
if ! test -d "${base_path}"; then
|
||||
# shellcheck disable=SC2174
|
||||
mkdir -m 0700 -p "${base_path}" >/dev/null 2>&1 ||
|
||||
mkdir -m 0700 -p -- "${base_path}" >/dev/null 2>&1 ||
|
||||
die "Cannot create directory: ${base_path}"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue