acmesh-official / acmesh-official/acme.sh

dns_arvan.sh: Invalid domain error when issuing wildcard certificates

Aperta Adatta ai principianti
#6,788 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Shell
Stelle
47.6k
Fork
5.7k
Merge medio
6g 5h
PR unite (30g)
15

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
shell
Ambito
cli, tooling
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Tranquilla
Chiarezza
Specificata chiaramente
Idoneità per principianti
70/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.