Skip to content

Commit

Permalink
Fix: Do not let host auth failures override successes
Browse files Browse the repository at this point in the history
In the report hosts table, authentication methods are now shown as
 successful whenever there is a "Auth-...-Success" detail for
 a given authentication type.
"Auth-...-Failure" details will no longer override this.

This can happen if SNMP authentication with one protocol version fails
but another version succeeds.
  • Loading branch information
timopollmeier committed Apr 21, 2023
1 parent 1f20eb9 commit fa46f22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gmp/models/report/host.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ class Host {
}
if (name.startsWith('Auth')) {
const authArray = name.split('-');
copy.authSuccess[authArray[1].toLowerCase()] =
authArray[2] === 'Success';
if (copy.authSuccess[authArray[1].toLowerCase()] !== true) {
copy.authSuccess[authArray[1].toLowerCase()] =
authArray[2] === 'Success';
}
}
copy.details.appsCount = appsCount;
});
Expand Down

0 comments on commit fa46f22

Please sign in to comment.