mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
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:
@@ -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): (.*)$/) {
|
||||
|
||||
Reference in New Issue
Block a user