(httpd-site) 02/02: Add --nopreamble option for use with apr-site, no functional change. [skip ci]

[email protected]
Newsgroups gmane.comp.apache.cvs
Message-ID <[email protected]>
This is an automated email from the ASF dual-hosted git repository.

notroj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/httpd-site.git

commit ae5cc811f9a73368e335a8f4da9b90b3a2ce7bc8
Author: Joe Orton <[email protected]>
AuthorDate: Thu Aug 6 15:41:51 2026 +0100

    Add --nopreamble option for use with apr-site, no functional change. [skip ci]
    
    Assisted-by: Claude Sonnet 4.6 <[email protected]>
---
 content/security/cvejsontohtml.py | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/content/security/cvejsontohtml.py b/content/security/cvejsontohtml.py
index 6da08a7..3e28cf1 100755
--- a/content/security/cvejsontohtml.py
+++ b/content/security/cvejsontohtml.py
@@ -12,6 +12,7 @@ parser.add_option("-e","--extratext",help="extra text to add to description",des
 parser.add_option("-i","--inputdirectory",help="directory of json files",dest="directory")
 parser.add_option("-d","--debug",help="enable debug output to stderr",dest="debug",action="store_true",default=False)
 parser.add_option("-l","--impactlink",help="URL for impact levels page",dest="impactlink",default="/security/impact_levels.html")
+parser.add_option("-n","--nopreamble",help="skip the page header/preamble output",dest="nopreamble",action="store_true",default=False)
 
 # To debug without getting flooded, put 1 working and 1 broken JSON file in tmp/ and pass --debug -i tmp
 
@@ -172,16 +173,17 @@ for k,v in sorted(entries.items(), key=lambda s: [int(u) if u.isdigit() else 999
 # Everything is sorted and pretty, this should be some python template thing
 
 # We are generating html in markdown. Add the metadata first.
-print ("Title: "+productname+" "+filterversion+" vulnerabilities")
-print ("asf_headings: False")
-print ("")
-print ("<h1>"+productname+" "+filterversion+" vulnerabilities</h1>")
-print ("<p>This page lists all security vulnerabilities fixed in released versions of "+productname+" "+filterversion+". Each vulnerability is given a security <a href=\""+options.impactlink+"\">impact rating</a> by the Apache security team - please note that this rating may well vary from platform to platform.  We also list the versions the flaw is known to affect, and where a flaw has not been verified list the version with a question mark.</p>")
-print ("<p>Please note that if a vulnerability is shown below as being fixed in a \"-dev\" release then this means that a fix has been applied to the development source tree and will be part of an upcoming full release.</p>")
-print ("<p>Please send comments or corrections for these vulnerabilities to the <a href=\"/security_report.html\">Security Team</a>.</p> <br/>")
+if not options.nopreamble:
+    print ("Title: "+productname+" "+filterversion+" vulnerabilities")
+    print ("asf_headings: False")
+    print ("")
+    print ("<h1>"+productname+" "+filterversion+" vulnerabilities</h1>")
+    print ("<p>This page lists all security vulnerabilities fixed in released versions of "+productname+" "+filterversion+". Each vulnerability is given a security <a href=\""+options.impactlink+"\">impact rating</a> by the Apache security team - please note that this rating may well vary from platform to platform.  We also list the versions the flaw is known to affect, and where a flaw has not been verified list the version with a question mark.</p>")
+    print ("<p>Please note that if a vulnerability is shown below as being fixed in a \"-dev\" release then this means that a fix has been applied to the development source tree and will be part of an upcoming full release.</p>")
+    print ("<p>Please send comments or corrections for these vulnerabilities to the <a href=\"/security_report.html\">Security Team</a>.</p> <br/>")
 
-if (options.extratext):
-    print ("<p>"+options.extratext+"</p><br/>")
+    if (options.extratext):
+        print ("<p>"+options.extratext+"</p><br/>")
 
 for sectioncves in sections:
     print ("\n<h1 id=\""+sectioncves["fixed"]+"\">Fixed in "+sectioncves["product"]+" "+sectioncves["fixed"]+"</h1><dl>\n")
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.