From 1195a40c450f94fee947b0dcaea5b4807536650c Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 21 Jul 2024 22:18:16 -0400 Subject: [PATCH] freemyip: Check entire result body, not just first line This is simpler, and should be more resilient to bugs. --- ddclient.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ddclient.in b/ddclient.in index 2086e77..62015a2 100755 --- a/ddclient.in +++ b/ddclient.in @@ -6425,10 +6425,8 @@ sub nic_freemyip_update { } next if !header_ok($h, $reply); (my $body = $reply) =~ s/^.*?\n\n//s; - my @reply = split(/\n/, $body); - my $returned = pop(@reply); - if ($returned !~ /OK/) { - failed("$h: Server said: $returned"); + if ($body !~ /OK/) { + failed("$h: Server said: $body"); next; } $config{$h}{'ip'} = $ip;