]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
vulnerabilities.cgi: Simplify regexes
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 22 May 2019 10:05:20 +0000 (11:05 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 22 May 2019 14:17:59 +0000 (15:17 +0100)
We can do the split in one.

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

index 76eb79f8220a67bc2f7136921ccca843154715df..b7e11c7100e2f1aad8a00aa1ee0665368123282f 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);
        }