From 66af7a86e455ecc8d2d59d8fdd7264bf60edb1c4 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Tue, 4 Dec 2018 16:22:01 +0100 Subject: CVEExtendFile: treat TEMP-* entries as unique Otherwise, they will get rehashed into a different temp name, preventing one to add notes to TEMP entries in an extend file. --- lib/python/bugs.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') diff --git a/lib/python/bugs.py b/lib/python/bugs.py index 700a9c0272..570a5f859c 100644 --- a/lib/python/bugs.py +++ b/lib/python/bugs.py @@ -789,6 +789,15 @@ class CVEExtendFile(CVEFile): is_extend = True + def isUniqueName(self, name): + # an extend file can have TEMP-* entries to refer to the temp values + # for e.g. CVE-2018-XXXX. Consider TEMP-* entries as unique, so they + # don't get re-hashed and their notes get added to the original entries + if name.startswith('TEMP-'): + return True + + return CVEFile.isUniqueName(self, name) + class DSAFile(FileBase): """A DSA file. -- cgit v1.2.3