acmesh-official / acmesh-official/acme.sh

dns_arvan.sh: Invalid domain error when issuing wildcard certificates

Abierto Apto para principiantes
#6,788 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Shell
Estrellas
47.6k
Forks
5.7k
Merge medio
6 d 5 h
PR fusionados (30 d)
15

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
shell
Área
cli, tooling
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Tranquilo
Claridad
Bien especificado
Aptitud para principiantes
70/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.