Merge pull request #2006 from drwetter/fix_1992_certificateIssuerName_3.0

Fix invalid JSON when certificate issuer contains non-ASCII chars (3.0)
This commit is contained in:
Dirk Wetter 2021-10-03 21:05:11 +02:00 committed by GitHub
commit 136b9416f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}