From: Michael Tremer Date: Wed, 22 May 2019 10:05:20 +0000 (+0100) Subject: vulnerabilities.cgi: Simplify regexes X-Git-Tag: v2.23-core133~68^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a96bcf413ac96d9df1ff883e3daeb7cdb4911b57;p=ipfire-2.x.git vulnerabilities.cgi: Simplify regexes We can do the split in one. Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/vulnerabilities.cgi b/html/cgi-bin/vulnerabilities.cgi index 76eb79f822..b7e11c7100 100644 --- a/html/cgi-bin/vulnerabilities.cgi +++ b/html/cgi-bin/vulnerabilities.cgi @@ -233,15 +233,11 @@ sub check_status($) { my $status = ; 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); }