vulnerabilities.cgi: Simplify regexes

We can do the split in one.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2019-05-22 11:05:20 +01:00
committed by Arne Fitzenreiter
parent 2f34103d47
commit a96bcf413a

View 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);
}