]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: fix quoting issue in #14886 14892/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 26 Nov 2024 13:14:06 +0000 (14:14 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 26 Nov 2024 13:48:39 +0000 (14:48 +0100)
pdns/recursordist/settings/generate.py
pdns/recursordist/settings/table.py

index bae4efc1e6f63a51c49965437cb4cfabbd575f08..d342bfed2489599d78fbb06fb342dfafbc4cdd66 100644 (file)
@@ -706,11 +706,12 @@ def gen_oldstyle_docs(srcdir, entries):
                 runtime = entry['runtime']
                 if not isinstance(runtime, list):
                     runtime = [runtime]
-                for k,v in enumerate(runtime):
-                    runtime[k] = '``' + runtime[k] + '``'
+                li = []
+                for v in runtime:
                     if v == 'reload-yaml':
                          continue
-                file.write(f"- Runtime modifiable using ``rec_control`` {', '.join(f'{w}' for w in runtime)}\n\n")
+                    li.append('``' + v + '``')
+                file.write(f"- Runtime modifiable using ``rec_control`` {', '.join(f'{w}' for w in li)}\n\n")
             file.write(entry['doc'].strip())
             file.write('\n\n')
 
@@ -772,11 +773,13 @@ def gen_newstyle_docs(srcdir, argentries):
                 runtime = entry['runtime']
                 if not isinstance(runtime, list):
                     runtime = [runtime]
-                for k,v in enumerate(runtime):
-                    runtime[k] = '``' + runtime[k] + '``'
+                li = []
+                for v in runtime:
+                    vv = '``' + v + '``'
                     if v == 'reload-yaml':
-                         runtime[k] = 'since 5.2.0: ' + runtime[k]
-                file.write(f"- Runtime modifiable using ``rec_control`` {', '.join(f'{w}' for w in runtime)}\n\n")
+                         vv = 'since 5.2.0: ' + vv
+                    li.append(vv)
+                file.write(f"- Runtime modifiable using ``rec_control`` {', '.join(f'{w}' for w in li)}\n\n")
             if 'doc-new' in entry:
                 file.write(fixxrefs(entries, entry['doc-new'].strip()))
             else:
index fc7604ed45c818e5ac83374d038b76802e32c7d1..f3d647ffa4c1b637518e064ec37c07a5906eb413 100644 (file)
@@ -792,7 +792,7 @@ That is, only if both the limits apply, the record will not be cached. This deci
         'help' : 'If we should never cache IPv4 ECS responses',
         'doc' : '''
 When set, never cache replies carrying EDNS IPv4 Client Subnet scope in the record cache.
-In this case the decision made by ```ecs-ipv4-cache-bits`` and ``ecs-cache-limit-ttl`` is no longer relevant.
+In this case the decision made by ``ecs-ipv4-cache-bits`` and ``ecs-cache-limit-ttl`` is no longer relevant.
  ''',
     'versionadded': '4.5.0'
     },
@@ -805,7 +805,7 @@ In this case the decision made by ```ecs-ipv4-cache-bits`` and ``ecs-cache-limit
         'help' : 'If we should never cache IPv6 ECS responses',
         'doc' : '''
 When set, never cache replies carrying EDNS IPv6 Client Subnet scope in the record cache.
-In this case the decision made by ```ecs-ipv6-cache-bits`` and ``ecs-cache-limit-ttl`` is no longer relevant.
+In this case the decision made by ``ecs-ipv6-cache-bits`` and ``ecs-cache-limit-ttl`` is no longer relevant.
  ''',
     'versionadded': '4.5.0'
     },
@@ -3388,7 +3388,7 @@ Sequence of negative trust anchors.
         ''',
         'skip-old' : 'Equivalent Lua config in :doc:`lua-config/dnssec`',
         'versionadded': '5.1.0',
-        'runtime': ['add-nta', 'clear-nta'],
+        'runtime': ['add-nta', 'clear-nta', 'reload-lua-config', 'reload-yaml'],
     },
     {
         'name' : 'trustanchorfile',
@@ -3402,6 +3402,7 @@ This can be used to read distribution provided trust anchors, as for instance ``
         ''',
         'skip-old' : 'Equivalent Lua config in :doc:`lua-config/dnssec`',
         'versionadded': '5.1.0',
+        'runtime': ['reload-lua-config', 'reload-yaml'],
     },
     {
         'name' : 'trustanchorfile_interval',