os-ddclient: GoDaddy updates still fail with the ddclient backend (TTL sent as a string), same as #5220

オープン
#5,972 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
json, perl, php
領域
backend, devops

調査の方向性

Start by checking how os-ddclient installs or configures ddclient 3.11.2 and where its GoDaddy backend is maintained; the report identifies nic_godaddy_update and the TTL value passed to encode_json. Reproduce with the provided ddclient -daemon=0 -verbose -noquiet -force -file /usr/local/etc/ddclient.conf command using TTL 600. Done means GoDaddy accepts the update with a numeric TTL, and the plugin’s handling of the requested default and failed update logging is addressed.

索引モデルが issue の本文から書いたものです。

説明

incomplete

This is #5220 again; that issue was closed as "not planned" by the stale bot, and the bug is still there.

Versions: OPNsense 26.7.10-amd64 (FreeBSD 15.1-RELEASE-p7), os-ddclient 1.34, ddclient 3.11.2_2

What happens: with the ddclient backend and service GoDaddy, no update ever succeeds, and nothing shows in the plugin's log or status columns. Running ddclient by hand shows two problems in a row:

  1. With the default TTL (300), GoDaddy rejects the update:
    SENDING:  data="[{\"ttl\":300, ...}]"
    RECEIVE:  HTTP/1.1 422 Unprocessable Entity
    {"code":"INVALID_BODY","fields":[{"code":"UNKNOWN_RESTRICTION","message":"must have a minimum value of 600","path":"records[0].ttl"}], ...}
    
  2. With TTL set to 600 in the account, ddclient sends it as a JSON string, and GoDaddy rejects that too:
    SENDING:  data="[{... \"ttl\":\"600\" ...}]"
    RECEIVE:  HTTP/1.1 422 Unprocessable Entity
    {"code":"INVALID_BODY","fields":[{"code":"UNEXPECTED_TYPE","message":"is not a integer","path":"records[0].ttl"}], ...}
    

So no TTL value works with GoDaddy.

Cause: in ddclient 3.11.2, nic_godaddy_update passes the config value straight into encode_json:

defined($config{$host}{'ttl'}) ? (ttl => $config{$host}{'ttl'}) : (),

Values read from ddclient.conf are strings, so JSON::PP encodes them quoted. Upstream ddclient tracked this as ddclient/ddclient#836, closed as fixed in 4.x, but OPNsense still ships 3.11.2.

Workaround (verified): forcing the value to a number makes the update succeed ("ttl":600, HTTP 200):

defined($config{$host}{'ttl'}) ? (ttl => 0 + $config{$host}{'ttl'}) : (),

The workaround is lost on every update that reinstalls ddclient.

Suggested fix:

  • Ship a ddclient with the upstream fix, or carry this one-line patch in the package.
  • Default the GoDaddy TTL to 600, GoDaddy's minimum, as #5220 proposed.
  • It would also help if failed updates showed up in the plugin's log page. Here they only appeared when ddclient was run by hand with -verbose.

To reproduce: os-ddclient, backend ddclient, service GoDaddy, any API key with DNS access, any TTL. Then run:

ddclient -daemon=0 -verbose -noquiet -force -file /usr/local/etc/ddclient.conf
主要言語
PHP
スター
1.2k
フォーク
926
平均マージ
1日 10時間
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

opnsense/plugins のほかの issue

opnsense/plugins の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。