From 508aa2f325eef50ec6afe032a1d538e019ebe94f Mon Sep 17 00:00:00 2001 From: Robert Buchholz Date: Sat, 7 Mar 2009 17:27:34 +0000 Subject: Hold source for reference in the list as well and use CONFIRM sources for URL field of new bugs svn path=/; revision=1158 --- lib/python/cvetools.py | 10 +++++----- lib/python/nvd.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/python/cvetools.py b/lib/python/cvetools.py index 7e5dc5c..d7d35e0 100644 --- a/lib/python/cvetools.py +++ b/lib/python/cvetools.py @@ -64,8 +64,8 @@ class CVEData: return {} SAs = [] names = {} - for url in refs: - if url.startswith("http://secunia.com/advisories/") or url.startswith("http://www.secunia.com/advisories/"): + for source, url in refs: + if source == u"SECUNIA" or url.startswith("http://secunia.com/advisories/") or url.startswith("http://www.secunia.com/advisories/"): SAs.append(re.sub(r".*advisories/(\d+)", r"\1", url)) import urllib2 @@ -221,7 +221,7 @@ class BugReporter: password = password, forget = False) - def post_bug(self, title, description, component="", whiteboard=""): + def post_bug(self, title, description, component="", whiteboard="", url=""): """ Posts a security bug, returning the Bug number or 0 """ bugno = 0 ccs = assign.get_cc_from_string(title) @@ -230,11 +230,11 @@ class BugReporter: severity = 'normal' try: try: - bugno = self.bugz_auth.post(title = title, description = description, cc = ccs) + bugno = self.bugz_auth.post(title = title, description = description, cc = ccs, url = url) print "Ignoring Bug component, please upgrade pybugz." except TypeError: # pybugz since 0.7.4 requires to specify product and component - bugno = self.bugz_auth.post(title = title, product="Gentoo Security", component=component, description = description, cc = ccs) + bugno = self.bugz_auth.post(title = title, product="Gentoo Security", component=component, description = description, cc = ccs, url = url) except Exception, e: print "An error occurred posting a bug: %s" % (e) diff --git a/lib/python/nvd.py b/lib/python/nvd.py index d457e04..1c1c9fb 100644 --- a/lib/python/nvd.py +++ b/lib/python/nvd.py @@ -133,7 +133,7 @@ class _Parser(xml.sax.handler.ContentHandler): pass def TAG_ref(self, name, attrs): if attrs.has_key('url'): - self.refs.append(attrs['url']) + self.refs.append([attrs['source'], attrs['url']]) def endElement(self, name): if name == 'entry': -- cgit v1.2.3-18-g5258