From d02805231abf4bc7afeab3c719db56ef46b50c2c Mon Sep 17 00:00:00 2001 From: Ruud Senden <8635138+rsenden@users.noreply.github.com> Date: Fri, 30 Aug 2024 18:22:24 +0200 Subject: [PATCH] fix: Fix error on `fcli ssc session login` command on older SSC versions (fixes #584) --- .../fortify/cli/ssc/access_control/helper/SSCTokenHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/access_control/helper/SSCTokenHelper.java b/fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/access_control/helper/SSCTokenHelper.java index e3bc6fec74..59167c5d44 100644 --- a/fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/access_control/helper/SSCTokenHelper.java +++ b/fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/access_control/helper/SSCTokenHelper.java @@ -174,7 +174,7 @@ private static SSCTokenGetOrCreateResponse getTokenData(UnirestInstance unirest, result.getData().setToken(token); return result; } catch ( UnexpectedHttpResponseException e ) { - if ( e.getStatus()==404 ) { + if ( e.getStatus()==404 || e.getStatus()==401 ) { // Older SSC versions don't support this endpoint, so we just return null return null; } else {