From 3a5e86b4d237beed85ea2e764036996d11aafeb7 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Wed, 29 May 2024 17:10:06 -0400 Subject: [PATCH] dnsexit2: Convert string interpolation to `sprintf` format specifier Rationale: * For consistency. * It's generally not a good idea to mix interpolation with `sprintf` because the interpolated string itself might coincidentally (or maliciously) contain format specifiers. --- ddclient.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ddclient.in b/ddclient.in index 2908849..8055787 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4196,7 +4196,7 @@ sub nic_dnsexit2_update { my $ipv = ($ip eq ($ipv6 // '')) ? '6' : '4'; my $type = ($ip eq ($ipv6 // '')) ? 'AAAA' : 'A'; - info("Going to update IPv$ipv address to %s for %s.", $ip, $h); + info("Going to update IPv%s address to %s for %s.", $ipv, $ip, $h); $config{$h}{'status-ipv$ipv'} = 'failed'; $total_payload{$ipv} = { name => $h, @@ -4295,7 +4295,7 @@ sub nic_dnsexit2_update { $config{$h}{"ipv$ipv"} = $total_payload{$ipv}{content}; $config{$h}{"status-ipv$ipv"} = 'good'; success("%s", $message); - success("Updated %s successfully to IPv$ipv address %s at time %s", $h, $total_payload{$ipv}{content}, prettytime($config{$h}{'mtime'})); + success("Updated %s successfully to IPv%s address %s at time %s", $h, $ipv, $total_payload{$ipv}{content}, prettytime($config{$h}{'mtime'})); } } elsif ($status eq 'warning') { warning("%s", $message);