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 <[email protected]> - - - - - 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.
_______________________________________________ debian-security-tracker-commits mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-security-tracker-commits
