From fc453a0de3f50300e13a8d69d68d56ddd89bdc0d Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 23 Jul 2024 02:00:51 -0400 Subject: [PATCH] porkbun: Check for JSON object, not just non-null --- ddclient.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient.in b/ddclient.in index 7731ffb..728558d 100755 --- a/ddclient.in +++ b/ddclient.in @@ -6810,7 +6810,7 @@ sub nic_porkbun_update { (my $body = $reply) =~ s/^.*?\n\n//s; $body =~ qr/{(?:[^{}]*|(?R))*}/mp; my $response = eval { decode_json(${^MATCH}) }; - if (!defined($response)) { + if (ref($response) ne 'HASH') { failed("$h: unexpected service response: $body"); next; }