vulnerabilities.cgi: Simplify regexes
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 22 May 2019 10:05:20 +0000 (11:05 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 25 May 2019 04:51:06 +0000 (06:51 +0200)
We can do the split in one.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/vulnerabilities.cgi

index 76eb79f..b7e11c7 100644 (file)
@@ -233,15 +233,11 @@ 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): (.*)$/) {
+       if ($status =~ /^(Vulnerable|Mitigation): (.*)$/) {
                return ($1, $2);
        }