From 4c79c6b607ad691cbab7f9a24f4865034f1ccad9 Mon Sep 17 00:00:00 2001 From: David Kerr Date: Fri, 21 Aug 2020 17:01:13 -0400 Subject: [PATCH] must not escape the 'data' field sent to servers. --- ddclient.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ddclient.in b/ddclient.in index f9c6a37..677ce60 100755 --- a/ddclient.in +++ b/ddclient.in @@ -2379,6 +2379,8 @@ sub fetch_via_curl { # don't include ${url} as that might expose login credentials $0 = sprintf("%s - WWW::Curl::Easy sending to %s", $program, "${protocol}://${server}"); verbose("SENDING:", "WWW::Curl::Easy to %s", "${protocol}://${server}"); + verbose("SENDING:", "%s", $headers) if ($headers); + verbose("SENDING:", "%s", $data) if ($data); my $rc = $curl->perform; @@ -2410,14 +2412,16 @@ sub fetch_via_curl { push(@curlopt, @header_lines); # Add in the data if any was provided (for POST/PATCH) - push(@curlopt, "data=\"".escape_curl_param(${data}).'"') if ($data ne ''); + push(@curlopt, "data=${data}") if ($data); # don't include ${url} as that might expose login credentials $0 = sprintf("%s - Curl system cmd sending to %s", $program, "${protocol}://${server}"); verbose("SENDING:", "Curl system cmd to %s", "${protocol}://${server}"); + verbose("SENDING:", "%s", $_) foreach (@curlopt); $reply = curl_cmd(@curlopt); } + verbose("RECEIVE:", "%s", $reply // ""); if (!$reply) { # don't include ${url} as that might expose login credentials warning("curl cannot connect to %s://%s using IPv%s",${protocol},${server},$ipversion);