diff options
author | Indrajit Raychaudhuri <irc@indrajit.com> | 2023-11-08 14:11:04 -0600 |
---|---|---|
committer | Indrajit Raychaudhuri <irc@indrajit.com> | 2023-11-30 21:42:23 -0600 |
commit | 535b4c1de059627072ee831437371c9cefd26eba (patch) | |
tree | e851daafcfd67f0dab8a05d4705b2839f3025b20 /data | |
parent | 78a7f0182a3ae504f8a29502cc064f56769df75a (diff) | |
download | vyos-1x-535b4c1de059627072ee831437371c9cefd26eba.tar.gz vyos-1x-535b4c1de059627072ee831437371c9cefd26eba.zip |
ddclient: T5708: Ensure password is always wrapped in quotes
Migration to 3.11.1 follow-up: This should make `ddclient.conf` parsing
more resilient to edge cases (particularly when `password` isn't the
last option right before the host parameter).
ddclient config parser applies special treatment to the password field
and would unwrap the quotes automatically.
Also, switch from now deprecated `use=no` to `use=disabled`.
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/dns-dynamic/ddclient.conf.j2 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/dns-dynamic/ddclient.conf.j2 b/data/templates/dns-dynamic/ddclient.conf.j2 index 879887a1f..356b8d0d0 100644 --- a/data/templates/dns-dynamic/ddclient.conf.j2 +++ b/data/templates/dns-dynamic/ddclient.conf.j2 @@ -13,9 +13,9 @@ web-skip{{ ipv }}='{{ web_options.skip }}', \ if{{ ipv }}={{ address }}, \ {% endif %} {% endfor %} -{# Other service options #} +{# Other service options with special treatment for password #} {% for k,v in kwargs.items() if v is vyos_defined %} -{{ k | replace('_', '-') }}={{ v }}{{ ',' if not loop.last }} \ +{{ k | replace('_', '-') }}={{ "'%s'" % (v) if k == 'password' else v }}{{ ',' if not loop.last }} \ {% endfor %} {# Actual hostname for the service #} {{ host }} @@ -29,7 +29,7 @@ cache={{ config_file | replace('.conf', '.cache') }} {# ddclient default (web=dyndns) doesn't support ssl and results in process lockup #} web=googledomains {# ddclient default (use=ip) results in confusing warning message in log #} -use=no +use=disabled {% if address is vyos_defined %} {% for address, service_cfg in address.items() %} |