From 8e24c92b1e4951aca4f85b84ee8bab9beb654e74 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 25 Jun 2024 22:16:49 -0400 Subject: [PATCH] infomaniak: Fix response parsing --- ChangeLog.md | 2 ++ ddclient.in | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 8f1eba9..b6e7622 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -83,6 +83,8 @@ repository history](https://github.com/ddclient/ddclient/commits/master). hostname. [#673](https://github.com/ddclient/ddclient/issues/673) * `infomaniak`: Fixed frequent forced updates after 25 days (`max-interval`). [#691](https://github.com/ddclient/ddclient/issues/691) + * `infomaniak`: Fixed incorrect parsing of server response. + [#692](https://github.com/ddclient/ddclient/issues/692) * `regfishde`: Fixed IPv6 support. [#691](https://github.com/ddclient/ddclient/issues/691) diff --git a/ddclient.in b/ddclient.in index 1a2594f..df3c168 100755 --- a/ddclient.in +++ b/ddclient.in @@ -8019,9 +8019,10 @@ sub nic_infomaniak_update { failed("could not update %s", $h); next; } - my ($status) = split / /, $reply, 1; + (my $body = $reply) =~ s/^.*?\n\n//s; + my ($status) = split(/ /, $body, 2); my ($ok, $msg) = - $statuses{$status} // (0, sprintf("Unknown reply from Infomaniak: %s", $reply)); + $statuses{$status} // (0, sprintf("Unknown reply from Infomaniak: %s", $body)); if (!$ok) { failed($msg); next;