[Git][security-tracker-team/security-tracker][master] 2 commits: process-cve-records: Workaround descriptions with non-ascii characters
Salvatore Bonaccorso (@carnil)
carnil at debian.org
Fri Apr 28 22:08:06 BST 2023
Salvatore Bonaccorso pushed to branch master at Debian Security Tracker / security-tracker
Commits:
564f7cfb by Salvatore Bonaccorso at 2023-04-28T23:02:42+02:00
process-cve-records: Workaround descriptions with non-ascii characters
This restores previous storing of the truncated descriptions in our
CVE list files until we know we can handle all non-ascii characters.
Particular care might be needed on webservice side.
Signed-off-by: Salvatore Bonaccorso <carnil at debian.org>
- - - - -
415a2c24 by Salvatore Bonaccorso at 2023-04-28T23:06:57+02:00
Process list once manually with process-cve-records
- - - - -
2 changed files:
- bin/process-cve-records
- data/CVE/list
Changes:
=====================================
bin/process-cve-records
=====================================
@@ -73,7 +73,9 @@ def parse_record(record, cve):
desc = desc.replace('\n', ' ')
# and even non-printable characters such as \xa0 ( )
- desc = "".join([ c for c in desc if c.isprintable() ])
+ # if a character is non-ascii then return character in
+ # ASCII-only representation.
+ desc = "".join([ c if ord(c) < 128 else ascii(c).strip('\'') for c in desc if c.isprintable() ])
# and some contain leading spaces
desc = desc.strip()
=====================================
data/CVE/list
=====================================
The diff for this file was not included because it is too large.
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/compare/465a8b58f3683275ad03007e2da4f028e6c9b898...415a2c24735674b858776c6ef1835b811e849098
--
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/compare/465a8b58f3683275ad03007e2da4f028e6c9b898...415a2c24735674b858776c6ef1835b811e849098
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/20230428/972f5683/attachment-0001.htm>
More information about the debian-security-tracker-commits
mailing list