porkbun: Check for JSON object, not just non-null

This commit is contained in:
Richard Hansen 2024-07-23 02:00:51 -04:00
parent 536c7c87a2
commit fc453a0de3

View file

@ -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;
}