[Git][security-tracker-team/security-tracker][master] 2 commits: Adapt parsing of MITRE master list according to new layout in html
Salvatore Bonaccorso
carnil at debian.org
Mon Mar 18 19:30:25 GMT 2019
Salvatore Bonaccorso pushed to branch master at Debian Security Tracker / security-tracker
Commits:
99098faf by Salvatore Bonaccorso at 2019-03-18T19:30:15Z
Adapt parsing of MITRE master list according to new layout in html
- - - - -
610e648e by Salvatore Bonaccorso at 2019-03-18T19:30:15Z
Truncate length of description text added to lists
This is not optimal at this point as it might truncate word in between
which in the old schema full words were left because MITRE did not
provide the description in one long line and the updatelist was just
adding the first line.
This still is enough as the tracker will add full description for the
webpage and the truncated description was just to keep a "short
description" in the CVE list file itself.
- - - - -
1 changed file:
- bin/updatelist
Changes:
=====================================
bin/updatelist
=====================================
@@ -48,7 +48,7 @@ while (<HTML>) {
if (m!\*\*\s+REJECT\s+\*\*!) {
$cves{$cve}{rejected}=1;
}
- if (m!Description:\s*</b><br>\s*(.*)! &&
+ if (m!Description:\s*</b><p>\s*(.*)</p>! &&
! m!\*\*\s+RESERVED\s+\*\*! && ! m!\*\*\s+REJECT\s+\*\*!) {
my $desc;
$desc=$1;
@@ -56,6 +56,8 @@ while (<HTML>) {
$desc=<HTML>;
chomp $desc;
}
+ # truncate length of description text added to lists
+ $desc = substr( $desc, 0, 70 );
$cves{$cve}{description}="($desc ...)";
}
}
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/compare/3d3b6e93dbb09ed3d962c7e2f07da92bd29409bc...610e648e7d6b51eaf35f2127f57eeb15ea1fcd99
--
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/compare/3d3b6e93dbb09ed3d962c7e2f07da92bd29409bc...610e648e7d6b51eaf35f2127f57eeb15ea1fcd99
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-security-tracker-commits/attachments/20190318/9fba184d/attachment.html>
More information about the debian-security-tracker-commits
mailing list