acmesh-official / acmesh-official/acme.sh
dns_arvan.sh: Invalid domain error when issuing wildcard certificates
- 主要言語
- Shell
- スター
- 47.6k
- フォーク
- 5.7k
- 平均マージ
- 6日 5時間
- マージ済み PR(30日)
- 15
説明
Problem
When trying to issue a wildcard certificate using dns_arvan DNS API, the script fails with "invalid domain" error.
Command used:
acme.sh --issue --dns dns_arvan -d mizekar.site -d '*.mizekar.site'
Error:
domain
[Sat Feb 14 01:18:10 +0330 2026] invalid domain
Root Cause
After debugging, I found that the _get_root() function in dnsapi/dns_arvan.sh is incorrectly trying to query the Arvan Cloud API:
Incorrect API usage: The function attempts to directly query /domains/{domain} endpoint (e.g., /domains/mizekar.site), but according to the Arvan Cloud API v4.0 documentation, the API requires fetching the complete domains list from /domains endpoint first, then searching within the response.
GET request bug: The _arvan_rest() function incorrectly appends $data parameter to GET request URLs.
Expected Behavior
The script should:
Successfully fetch the domains list from Arvan API
Find the domain ID from the list
Add TXT records for DNS challenge
Issue wildcard certificates without errors
Environment
acme.sh version: 3.1.3
DNS Provider: Arvan Cloud (ArvanCloud.ir)
API Version: 4.0
Domain: mizekar.site (wildcard: .mizekar.site)
Debug Information
From debug logs:
[Sat Feb 14 01:18:10 +0330 2026] GET[Sat Feb 14 01:18:10 +0330 2026] url='https://napi.arvancloud.ir/cdn/4.0/domains/mizekar.site'[Sat Feb 14 01:18:11 +0330 2026] h='site'[Sat Feb 14 01:18:11 +0330 2026] GET[Sat Feb 14 01:18:11 +0330 2026] url='https://napi.arvancloud.ir/cdn/4.0/domains/site'[Sat Feb 14 01:18:11 +0330 2026] invalid domain
The API correctly returns the domains list when querying /domains (without domain name), but the current implementation doesn't use this approach.
Proposed Solution
Modify _get_root() to fetch domains list from /domains endpoint first
Search for the domain within the response
Fix _arvan_rest() GET request handling
Improve error handling and record management
Related
API Documentation: https://www.arvancloud.ir/api/cdn/4.0#tag/Domain/operation/domains.index
コントリビューションガイド
調査の方向性
Start in dnsapi/dns_arvan.sh at the _get_root() and _arvan_rest() functions named in the issue. Reproduce with `acme.sh --issue --dns dns_arvan -d mizekar.site -d '*.mizekar.site'` using debug logging to confirm current URL requests and compare them to the expected Arvan API flow. Validate that domain lookup uses the /domains listing endpoint before TXT record operations as described in the provided API reference. Done means wildcard issuance completes without the `invalid domain` error and the request flow reflects the fix.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- cli, tooling
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 70/100