Link to all-issues page, better detection of "no vulnerabilities" for a given base...
[openssl-web.git] / bin / mk-cvepage
index 1242fe2578a48bd98ad6b6afb2f767bbb0e85031..70e18cc31ae47a6f7e5f4cf9dcadef7cfdddb33e 100755 (executable)
@@ -129,23 +129,24 @@ for issue in sorted(issues, key=lambda x: (x.getAttribute('public'), x.getElemen
         allissues += "<li>This issue was also addressed in "+ ", ".join( also)
     allissues += "</ul></dd>"
 
-allissues += "</dl>"
 preface = "<!-- do not edit this file it is autogenerated, edit vulnerabilities.xml -->"
 if options.base:
-    # for now don't put the link to the per-base page on main page until it's tested
+    # for now don't put the link to the per-base page on main page until it's ready to go live
     bases = []
     for base in allyourbase(dom):
         if (options.base and base in options.base):
-            bases.append("%s " %(base))
+            bases.append("%s" %(base))
         else:
-            bases.append( "<a href=\"vulnerabilities-%s.html\">%s</a> " %(base,base))
+            bases.append( "<a href=\"vulnerabilities-%s.html\">%s</a>" %(base,base))
     preface += "Show issues fixed only in OpenSSL " + ", ".join(bases)
+    if (options.base):
+        preface += ", or <a href=\"vulnerabilities.html\">all versions</a>"
     preface += "<h2>Fixed in OpenSSL %s</h2>" %(options.base)
 if len(allyears)>1: # If only vulns in this year no need for the year table of contents
     preface += "<p><a name=\"toc\">Jump to year: </a>" + ", ".join( "<a href=\"#y%s\">%s</a>" %(year,year) for year in allyears)
 preface += "</p>"
-if "<dt>" in allissues:
-    preface += allissues
+if allissues != "":
+    preface += allissues + "</dl>"
 else:
     preface += "No vulnerabilities"