vulnerabilities.cgi fix string handling

remove lf at the end for correct matching
and not strip "Mitigated:" if it was not full working and still
vulnerable.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Arne Fitzenreiter
2019-05-25 06:54:35 +02:00
parent 413f84e988
commit e896a9bd3d

View File

@@ -150,7 +150,7 @@ for my $vuln (sort keys %VULNERABILITIES) {
<font color="$colour">
END
if ($message) {
print "<strong>$status_message</strong>: $message";
print "<strong>$status_message</strong> - $message";
} else {
print "<strong>$status_message</strong>";
}
@@ -227,9 +227,11 @@ sub check_status($) {
my $status = <FILE>;
close(FILE);
chomp($status);
# Fix status when something has been mitigated, but not fully, yet
if ($status =~ /^(Mitigation): (.*vulnerable.*)$/) {
return ("Vulnerable", $2);
return ("Vulnerable", $status);
}
if ($status =~ /^(Vulnerable|Mitigation): (.*)$/) {