From 3644aace965570a7f091218e4746e6b7011e9517 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelsalam Date: Mon, 9 Oct 2023 10:31:49 +0200 Subject: [PATCH] Fix: Fixed the filter ranges for severity values 9 and 10 - Fixed filter range for value 9 to exclude 10. - Fixed filter range for value 10 to be 10 instead of >10 --- src/web/components/dashboard/display/cvss/cvssdisplay.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/web/components/dashboard/display/cvss/cvssdisplay.js b/src/web/components/dashboard/display/cvss/cvssdisplay.js index 62e41346ca..e48da7963e 100644 --- a/src/web/components/dashboard/display/cvss/cvssdisplay.js +++ b/src/web/components/dashboard/display/cvss/cvssdisplay.js @@ -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}`); @@ -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}`);