Fix invalid JSON when certificate issuer contains non-ASCII chars

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

See #1992
This commit is contained in:
Dirk 2021-10-03 18:19:24 +02:00
parent 068e07c52c
commit a5aa3a4bbf
1 changed files with 1 additions and 1 deletions

View File

@ -1185,7 +1185,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
}