From 09973c8c444332ae89ae24ccbbb6ddbdd7326b4b Mon Sep 17 00:00:00 2001 From: David Cooper Date: Thu, 7 Apr 2022 13:57:49 -0400 Subject: [PATCH] Fix flat JSON file PR #2140 contains a bug when handling flat JSON files. FIRST_FINDING should only be set to true in the case of structured JSON output, since it is only in that case that fileout_insert_warning() appends a comma to the JSON file. This commit fixes the problem. --- testssl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index 70ebd67..d68aa33 100755 --- a/testssl.sh +++ b/testssl.sh @@ -1313,8 +1313,8 @@ fileout_insert_warning() { else echo -e ", " >>"$JSONFILE" fi + FIRST_FINDING=true fi - FIRST_FINDING=true } fileout_csv_finding() {