From 4dae3895e4cece87ca81751824477b85599f2a05 Mon Sep 17 00:00:00 2001 From: David Cooper Date: Fri, 24 Jun 2022 10:17:51 -0400 Subject: [PATCH] Fix #2198 This commit fixes #2198 by ensuring that a comma is added before "service" finding if $FIRST_FINDING is false. --- testssl.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testssl.sh b/testssl.sh index eb41d0f..a347438 100755 --- a/testssl.sh +++ b/testssl.sh @@ -1233,6 +1233,8 @@ fileout_json_finding() { if [[ "$1" == service ]]; then if [[ $SERVER_COUNTER -gt 1 ]]; then echo " ," >> "$JSONFILE" + elif ! "$FIRST_FINDING"; then + echo -n "," >> "$JSONFILE" fi target="$NODE" $do_mx_all_ips && target="$URI"