]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
fix: V-004 security vulnerability
authorJoe Orton <jorton@apache.org>
Thu, 4 Jun 2026 07:52:10 +0000 (07:52 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 4 Jun 2026 07:52:10 +0000 (07:52 +0000)
Automated security fix generated by OrbisAI Security
fix: the ctauditscts script constructs a command str... in ctauditscts

The ctauditscts script constructs a command string and passes it to os

Submitted by: orbisai0security <mediratta01.pally gmail.com>
Github: closes #664

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1934967 13f79535-47bb-0310-9956-ffa450edef68

support/ctauditscts

index 6f4c12d12d4142da2106c4242781384990bd7907..44ebc5553b8b712e16c6f8abcd4f4c96741ff7d5 100755 (executable)
@@ -20,6 +20,7 @@ import os
 import sqlite3
 import ssl
 import struct
+import subprocess
 import sys
 import tempfile
 
@@ -111,7 +112,7 @@ def audit(fn, tmp, already_checked, cur):
 
             already_checked[key] = True
 
-            log_url_arg = ''
+            log_url = None
             if cur:
                 stmt = 'SELECT * FROM loginfo WHERE log_id = ?'
                 cur.execute(stmt, [log_id_hex])
@@ -122,14 +123,15 @@ def audit(fn, tmp, already_checked, cur):
                     # verify_single_proof doesn't accept <scheme>://
                     if '://' in log_url:
                         log_url = log_url.split('://')[1]
-                    log_url_arg = '--log_url %s' % log_url
 
                     print '    Log URL: ' + log_url
 
-            cmd = 'verify_single_proof.py --cert %s --timestamp %s %s' % \
-                  (tmp_leaf_pem[1], timestamp_ms, log_url_arg)
-            print '>%s<' % cmd
-            os.system(cmd)
+            cmd = ['verify_single_proof.py', '--cert', tmp_leaf_pem[1],
+                   '--timestamp', str(timestamp_ms)]
+            if log_url:
+                cmd += ['--log_url', log_url]
+            print '>%s<' % ' '.join(cmd)
+            subprocess.call(cmd)
 
         os.unlink(tmp_leaf_pem[1])