Skip to content

Commit

Permalink
Fix: Fixed the filter ranges for severity values 9 and 10
Browse files Browse the repository at this point in the history
- Fixed filter range for value 9 to exclude 10.
- Fixed filter range for value 10 to be 10 instead of >10
  • Loading branch information
a-h-abdelsalam authored and bjoernricks committed Oct 9, 2023
1 parent 21b1282 commit 3644aac
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/web/components/dashboard/display/cvss/cvssdisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CvssDisplay extends React.Component {

let statusFilter;

if (isDefined(start) && start >= 0 && end < 10) {
if (isDefined(start) && isDefined(end) && start >= 0) {
const startTerm = FilterTerm.fromString(`severity>${start}`);
const endTerm = FilterTerm.fromString(`severity<${end}`);

Expand All @@ -69,9 +69,7 @@ class CvssDisplay extends React.Component {
let statusTerm;

if (isDefined(start)) {
if (start > 0) {
statusTerm = FilterTerm.fromString(`severity>${start}`);
} else if (start === NA_VALUE) {
if (start === NA_VALUE) {
statusTerm = FilterTerm.fromString('severity=""');
} else {
statusTerm = FilterTerm.fromString(`severity=${start}`);
Expand Down

0 comments on commit 3644aac

Please sign in to comment.