]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/vulnerabilities.cgi
vulnerablities.cgi: add colours for vuln,smt and unknown output.
[ipfire-2.x.git] / html / cgi-bin / vulnerabilities.cgi
index 371ffa5473d73139986070f1f15c3f677e1ad548..91db2f4c380952fef6f16ef14a1e7ede1b95f971 100644 (file)
@@ -125,14 +125,22 @@ for my $vuln (sort keys %VULNERABILITIES) {
                $colour = "white";
                $bgcolour = ${Header::colourred};
 
+       # Mitigated but smt is enabled
+       } elsif ($status eq "Mitigation-SMT") {
+               $status_message = $Lang::tr{'mitigated'};
+               $colour = "black";
+               $bgcolour = ${Header::colourorange};
+
        # Mitigated
        } elsif ($status eq "Mitigation") {
                $status_message = $Lang::tr{'mitigated'};
                $colour = "black";
-               $bgcolour = ${Header::colourorange};
+               $bgcolour = ${Header::colouryellow};
 
        } else {
-               next;
+               $status_message = $status;
+               $colour = "white";
+               $bgcolour = ${Header::colourblue};
        }
 
        my $table_colour = ($id++ % 2) ? $color{'color22'} : $color{'color20'};
@@ -224,6 +232,14 @@ sub check_status($) {
        my $status = <FILE>;
        close(FILE);
 
+       if ($status =~ /^(Vulnerable): (.*)$/) {
+               return ($1, $2);
+       }
+
+       if ($status =~ /^(Mitigation): (.*vulnerable.*)$/) {
+               return ("Mitigation-SMT", $2);
+       }
+
        if ($status =~ /^(Mitigation): (.*)$/) {
                return ($1, $2);
        }