Add files via upload#6975
Conversation
|
Welcome |
|
Hello,
I've made a plugin for comlaude registrar using API to update DNS.
Seems to work pretty well.
Matthias DUPONT
DIRECTEUR IT
02 55 19 00 26
06 10 47 98 79
***@***.***
www.vetpartners.fr
…________________________________
De : github-actions[bot] ***@***.***>
Envoyé : mardi 19 mai 2026 15:25
À : acmesh-official/acme.sh ***@***.***>
Cc : Matthias DUPONT ***@***.***>; Author ***@***.***>
Objet : Re: [acmesh-official/acme.sh] Add files via upload (PR #6975)
Mise en garde: Ce mail provenant d’un tiers externe à VetPartners, veuillez le considérer comme potentiellement dangereux.
[https://avatars.githubusercontent.com/in/15368?s=20&v=4]github-actions[bot] left a comment (acmesh-official/acme.sh#6975)<#6975 (comment)>
Welcome
READ ME !!!!!
Read me !!!!!!
First thing: don't send PR to the master branch, please send to the dev branch instead.
Please read the DNS API Dev Guide<../wiki/DNS-API-Dev-Guide>.
You MUST pass the DNS-API-Test<../wiki/DNS-API-Test>.
Then reply on this message, otherwise, your code will not be reviewed or merged.
Please also make sure to add/update the usage here: https://github.com/acmesh-official/acme.sh/wiki/dnsapi2<https://github.com/acmesh-official/acme.sh/wiki/dnsapi2>
注意: 必须通过了 DNS-API-Test<../wiki/DNS-API-Test> 才会被 review. 无论是修改, 还是新加的 dns api, 都必须确保通过这个测试.
—
Reply to this email directly, view it on GitHub<#6975 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BJQGATD5GDBH3TRRZNBE6ST43RODZAVCNFSM6AAAAACZEMBYW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DIOBYGE4TINZVHE>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
Les informations contenues dans cet e-mail et toutes les pièces jointes sont confidentielles et peuvent faire l'objet d'un privilège légal, professionnel ou autre. Elles sont destinées uniquement au (x) destinataire (s) désigné (s) et ne peut être divulgué à quiconque sans le consentement de VetPartners. Si vous n'êtes pas le destinataire désigné, vous ne devez pas utiliser, divulguer, distribuer, copier, imprimer ou vous fier au contenu de l'e-mail. Dans un tel cas, veuillez nous contacter et détruire immédiatement l'e-mail.
Virus informatiques: Nous faisons tous les efforts possibles pour exclure tout virus ou tout autre défaut qui pourrait affecter tout ordinateur ou système informatique, de cet e-mail et de toutes les pièces jointes, mais il est de la responsabilité du destinataire de s'assurer qu'ils sont exempts de virus et nous n'acceptons aucune responsabilité pour les pertes ou dommages résultant de quelque manière que ce soit de leur réception ou de leur utilisation.
Opinions exprimées par e-mail: Ce sont les opinions de la personne qui les exprime et ne sont pas nécessairement celles de VetPartners.
|
There was a problem hiding this comment.
Pull request overview
This PR adds a new ComLaude DNS API hook for managing ACME DNS-01 TXT records through ComLaude’s API.
Changes:
- Adds
dns_comlaude_addanddns_comlaude_rm. - Adds ComLaude authentication and root-zone lookup helpers.
- Introduces direct API calls for TXT record lookup, creation, and deletion.
Shell Review Summary
Critical Issues (Must Fix Before Merge):
- Script uses bash instead of POSIX sh.
- Credentials/group ID are not persisted or fully validated.
- Raw
curl/jqusage bypasses acme.sh helpers and portability expectations. - Add/remove operations return success without validating API success.
Suggestions (Improvements to Consider):
- Use standard acme.sh logging helpers instead of raw
echo. - Escape JSON payload values using the project helper.
Good Practices (Points to Commend):
- Implements both required add and remove entry points.
- Attempts to avoid duplicate TXT creation before adding records.
| @@ -0,0 +1,150 @@ | |||
| #!/usr/bin/env bash | |||
| # ===== CONFIG ===== | ||
| COMLAUDE_API="https://api.comlaude.com" |
| if [ -z "${COMLAUDE_USERNAME:-}" ] || [ -z "${COMLAUDE_PASSWORD:-}" ] || [ -z "${COMLAUDE_API_KEY:-}" ]; then | ||
| echo "❌ Missing COMLAUDE credentials" | ||
| return 1 |
| AUTH_RESPONSE=$(curl -s -X POST "$COMLAUDE_API/api_login" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d "{ | ||
| \"username\": \"$COMLAUDE_USERNAME\", | ||
| \"password\": \"$COMLAUDE_PASSWORD\", | ||
| \"api_key\": \"$COMLAUDE_API_KEY\" | ||
| }") | ||
|
|
||
| COMLAUDE_ACCESS_TOKEN=$(echo "$AUTH_RESPONSE" | jq -r '.data.access_token') |
| -d "{ | ||
| \"username\": \"$COMLAUDE_USERNAME\", | ||
| \"password\": \"$COMLAUDE_PASSWORD\", | ||
| \"api_key\": \"$COMLAUDE_API_KEY\" | ||
| }") |
| return 1 | ||
| fi | ||
|
|
||
| echo "🔎 Checking domain: $d" |
| RESPONSE=$(curl -s -X POST \ | ||
| -H "Authorization: Bearer $COMLAUDE_ACCESS_TOKEN" \ | ||
| -H "Content-Type: application/json" \ | ||
| "$COMLAUDE_API/groups/$COMLAUDE_GROUP_ID/zones/$_zone_id/records" \ | ||
| -d "{ | ||
| \"type\": \"TXT\", | ||
| \"name\": \"$fulldomain\", | ||
| \"value\": \"$txtvalue\", | ||
| \"ttl\": 60 | ||
| }") | ||
|
|
||
| echo "$RESPONSE" | jq . | ||
|
|
||
| return 0 |
| curl -s -X DELETE \ | ||
| -H "Authorization: Bearer $COMLAUDE_ACCESS_TOKEN" \ | ||
| "$COMLAUDE_API/groups/$COMLAUDE_GROUP_ID/zones/$_zone_id/records/$RECORD_ID" | ||
|
|
|
This needs a rewrite following the DNS API Dev Guide:
|
No description provided.