1
0
mirror of https://github.com/drwetter/testssl.sh.git synced 2025-05-16 21:26:04 +02:00

Fix invalid JSON when certificate issuer contains non-ASCII chars (3.0)

Changed printf %s to printf %b which cause now to output UTF-8 correctly.

See .
This commit is contained in:
Dirk 2021-10-03 18:31:06 +02:00
parent c3d2cf75b4
commit 2e821b9f62

@ -802,7 +802,7 @@ fileout_json_print_parameter() {
spaces=" " || \
spaces=" "
if [[ -n "$value" ]] || [[ "$parameter" == finding ]]; then
printf "%s%s%s%s" "$spaces" "\"$parameter\"" "$filler" ": \"$value\"" >> "$JSONFILE"
printf -- "%b%b%b%b" "$spaces" "\"$parameter\"" "$filler" ": \"$value\"" >> "$JSONFILE"
"$not_last" && printf ",\n" >> "$JSONFILE"
fi
}