From 0c6f4ef7c8383c502ea8efbbf09c5b2eda86e629 Mon Sep 17 00:00:00 2001 From: "Deven T. Corzine" Date: Sun, 27 Sep 2020 02:42:11 -0400 Subject: [PATCH] Fix internal API error in geturl() call for Gandi. In nic_gandi_update(), calling geturl() with a hash parameter is incorrect usage, because geturl() calls either fetch_via_curl(@_) or fetch_via_socket_io(@_), both of which contain "my %params = @_;" -- this causes a "Reference found where even-sized list expected" error because @_ needs to be a list of key-value pairs to be assigned to %params, not a reference to a hash containing those key-value pairs. The fix is simply to remove the braces around the list of key-value pairs from the geturl() parameters. --- ddclient.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ddclient.in b/ddclient.in index 4ddd505..804e5cb 100755 --- a/ddclient.in +++ b/ddclient.in @@ -5743,13 +5743,13 @@ sub nic_gandi_update { $url = "https://$config{$h}{'server'}$config{$h}{'script'}"; $url .= "/livedns/domains/$config{$h}{'zone'}/records/$hostname/$rrset_type"; - my $reply = geturl({ + my $reply = geturl( proxy => opt('proxy'), url => $url, headers => $headers, method => 'PUT', data => $data, - }); + ); unless ($reply) { failed("%s -- Could not connect to %s.", $h, $config{$h}{'server'}); next;