You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2021/10/08 13:24:24 UTC
[httpd-site] branch main updated: Allow multiple credits and put
them in a list
This is an automated email from the ASF dual-hosted git repository.
rpluem pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/httpd-site.git
The following commit(s) were added to refs/heads/main by this push:
new e4363a8 Allow multiple credits and put them in a list
e4363a8 is described below
commit e4363a8af2fdb06a3b88215b4f05c0cc1e9e2d69
Author: Ruediger Pluem <r....@gmx.de>
AuthorDate: Fri Oct 8 15:24:15 2021 +0200
Allow multiple credits and put them in a list
---
content/security/cvejsontohtml.py | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/content/security/cvejsontohtml.py b/content/security/cvejsontohtml.py
index fdb1ac2..65bad91 100644
--- a/content/security/cvejsontohtml.py
+++ b/content/security/cvejsontohtml.py
@@ -56,9 +56,10 @@ for k,v in sorted(entries.items(), key=lambda s: [int(u) if u.isdigit() else 999
e['impact'] = cve["impact"][0]["other"]
e['title'] = cve["CVE_data_meta"]["TITLE"]
e['desc'] = cve["description"]["description_data"][0]["value"]
- e['credit'] = ""
+ e['credit'] = []
if ("credit" in cve):
- e['credit'] = cve["credit"][0]["value"]
+ for credit in cve["credit"]:
+ e['credit'].append(credit["value"])
affects = []
product = cve["affects"]["vendor"]["vendor_data"][0]["product"]["product_data"][0]
productname = product['product_name']
@@ -109,7 +110,15 @@ for sectioncves in sections:
desc = saxutils.escape(e['desc'])
desc = re.sub(r'\n','</p><p>', desc)
html += "<dd><p>"+desc+"</p>\n"
- if (e['credit'] != ""): html += "<p>Acknowledgements: "+saxutils.escape(e['credit'])+"</p>\n"
+ if (e['credit']):
+ html += "<p>Acknowledgements:"
+ if len(e['credit']) == 1:
+ html += " "+saxutils.escape(e['credit'][0])+"</p>\n"
+ else:
+ html += "</p>\n<ul>\n"
+ for credit in e['credit']:
+ html += "<li>"saxutils.escape(credit) + "</li>\n"
+ html += "</ul>\n"
html += "<table class=\"cve\">"
e['timetable'].append(["Affects",e['affects']]);
for ti in e['timetable']: