Commit 8283ffeb by Vincent Pelletier

shell: Resist inputs starting with dashes.

1 parent 2261582d
......@@ -938,7 +938,7 @@ EOF
crt="$(getCertificate "${ca_anon_url}/${mode_path}" "$csr_id")"
status=$?
test $status -ne 0 && return $status
if [ "$crt_path" = '-' ]; then
if [ "x$crt_path" = 'x-' ]; then
printf '%s\n' "$crt"
else
if [ -e "$crt_path" ]; then
......@@ -1002,7 +1002,7 @@ EOF
)"
status=$?
test $status -ne 0 && return $status
if [ "$csr_path" = '-' ]; then
if [ "x$csr_path" = 'x-' ]; then
printf '%s\n' "$csr"
else
printf '%s\n' "$csr" > "$csr_path"
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!