Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report bugs to porkbun dns api #3450

Open
qkdreyer opened this issue Mar 13, 2021 · 14 comments
Open

Report bugs to porkbun dns api #3450

qkdreyer opened this issue Mar 13, 2021 · 14 comments
Assignees
Labels
3rd party api report bugs to dns api, deploy hooks and notification hooks

Comments

@qkdreyer
Copy link
Contributor

This is the place to report bugs in the porkbun DNS API.

If you experience a bug, please report it in this issue.

Thanks!

@Neilpang Neilpang added the 3rd party api report bugs to dns api, deploy hooks and notification hooks label Mar 14, 2021
@sevengiants
Copy link

thanks, tested and worked fine.

@GeorgeRT
Copy link

Not sure what to submit but issuing a cert for a subdomain creates TXT record for the domain and hence verify fails.

@isbjorn
Copy link

isbjorn commented Apr 5, 2021

@GeorgeRT With this patch I made cert for my 4th-level subdomain:

*** /home/foo/dns_porkbun.sh        2021-04-04 21:19:04.628732412 +0000
--- /home/foo/dns_porkbun.sh.working        2021-04-04 23:53:21.227966009 +0000
***************
*** 110,117 ****

      if _porkbun_rest POST "dns/retrieve/$h"; then
        if _contains "$response" "\"status\":\"SUCCESS\""; then
-         _sub_domain="$(echo "$fulldomain" | sed "s/\\.$_domain\$//")"
          _domain=$h
          return 0
        else
          _debug "Go to next level of $_domain"
--- 110,117 ----

      if _porkbun_rest POST "dns/retrieve/$h"; then
        if _contains "$response" "\"status\":\"SUCCESS\""; then
          _domain=$h
+         _sub_domain="$(echo "$fulldomain" | sed "s/\\.$_domain\$//")"
          return 0
        else
          _debug "Go to next level of $_domain"

tldr: in function _get_root value of _sub_domain should be calculated after value of _domain

Keep in mind that dns changes may take a long time to propagate. Like 10 minutes or more.

@GeorgeRT
Copy link

GeorgeRT commented Apr 5, 2021

That woks. Thanks.

@zodiaq
Copy link

zodiaq commented May 6, 2021

When dns_porkbun.sh deletes the txt that has the value begins a dash, grep fails in dns_porkbun_rm().

Fri May  7 02:37:26 2021 daemon.info run-acme[31357]: Removing txt: -qb09FX66q************************** for domain: _acme-challenge.alias*************.net
Fri May  7 02:37:35 2021 daemon.err run-acme[31357]: grep: unrecognized option: b
Fri May  7 02:37:35 2021 daemon.err run-acme[31357]: BusyBox v1.33.0 () multi-call binary.
Fri May  7 02:37:35 2021 daemon.err run-acme[31357]:
Fri May  7 02:37:35 2021 daemon.err run-acme[31357]: Usage: grep [-HhnlLoqvsrRiwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...

'--' may solve this.

-    record_id=$(echo "$response" | tr '{' '\n' | grep "$txtvalue" | cut -d, -f1 | cut -d: -f2 | tr -d \")
+    record_id=$(echo "$response" | tr '{' '\n' | grep -- "$txtvalue" | cut -d, -f1 | cut -d: -f2 | tr -d \")

https://stackoverflow.com/questions/2427913/

@Neilpang
Copy link
Member

Neilpang commented May 8, 2021

@zodiaq
please upgrade to dev branch:

acme.sh --upgrade -b dev

@Haarolean
Copy link
Contributor

Haarolean commented May 22, 2021

The records being added via API have the wrong domain name.
I've issued a cert via
./acme.sh --issue --domain cronfire.ru --domain *.cronfire.ru --home "." --dns dns_porkbun --challenge-alias le.cronfire.ru
But the records added are these:
image
Names should be 'le.cronfire.ru', not 'le.le.cronfire.ru'
[Sat May 22 20:03:30 MSK 2021] Checking cronfire.ru for _acme-challenge.le.cronfire.ru

UPD: fixed in #3529

@Haarolean
Copy link
Contributor

Haarolean commented May 27, 2021

Tried issuing a cert without challenge-alias:
./acme.sh --issue -d s3.haarolean.dev --home "." --dns dns_porkbun
The record was added for _acme-challenge.haarolean.dev but was checked for s3.haarolean.dev
[Thu May 27 04:07:03 MSK 2021] Checking s3.haarolean.dev for _acme-challenge.s3.haarolean.dev
I have to edit the record name manually again.

UPD: fixed in #3529

@hitchhooker
Copy link

satoshi@vmi565604:/etc/nginx/acme-config$ acme.sh --config-home . --issue --dns dns_porkbun -d expectchaos.com -d www.expectchaos.com
[Thu 29 Jul 2021 01:59:53 AM CEST] Using CA: https://acme.zerossl.com/v2/DV90
[Thu 29 Jul 2021 01:59:53 AM CEST] Multi domain='DNS:expectchaos.com,DNS:www.expectchaos.com'
[Thu 29 Jul 2021 01:59:53 AM CEST] Getting domain auth token for each domain
[Thu 29 Jul 2021 01:59:56 AM CEST] Getting webroot for domain='expectchaos.com'
[Thu 29 Jul 2021 01:59:56 AM CEST] Getting webroot for domain='www.expectchaos.com'
[Thu 29 Jul 2021 01:59:56 AM CEST] Adding txt value: -TimXiF76VxjJHkIZbg3LSLBQ_-v3hXjJ8YJgtDZENc for domain:  _acme-challenge.expectchaos.com
[Thu 29 Jul 2021 02:00:17 AM CEST] Error add txt for domain:_acme-challenge.expectchaos.com
[Thu 29 Jul 2021 02:00:17 AM CEST] Please add '--debug' or '--log' to check more details.
[Thu 29 Jul 2021 02:00:17 AM CEST] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh

no idea whats wrong but cant seem to use porkbun

@Haarolean
Copy link
Contributor

Haarolean commented Jul 29, 2021 via email

@hitchhooker
Copy link

hitchhooker commented Jul 29, 2021

just read the topic earlier. seems like properly set config path "." instaed of "/etc/nginx/acme-config" was the problem here.
solved cheers

@Haarolean
Copy link
Contributor

Haarolean commented Jul 29, 2021 via email

Sp1l pushed a commit to Sp1l/acme.sh that referenced this issue Aug 10, 2021
@richardharr
Copy link

i have this code:
module.exports.getDomains = async function(apikey, config_json, domain){
options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': apikey
},
body: JSON.stringify({data: config_json})
};
myResponse = await fetch('https://api-ipv4.porkbun.com/api/json/v3/dns/retrieve/' + domain, options).catch(err=>{console.log(err)})
domainsobject = await myResponse.json()
console.log(domainsobject)
return domainsobject
}
this is a function that is called in a nodejs project like this:
domainsObject = await porkbun_api.getDomains("here goes api key", config_json_object, "randomdomain")
and it prints in the console:
{ status: 'ERROR',
message: 'All API requests require an API key.' }
Please help!

@richardharr
Copy link

i have this code: module.exports.getDomains = async function(apikey, config_json, domain){ options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': apikey }, body: JSON.stringify({data: config_json}) }; myResponse = await fetch('https://api-ipv4.porkbun.com/api/json/v3/dns/retrieve/' + domain, options).catch(err=>{console.log(err)}) domainsobject = await myResponse.json() console.log(domainsobject) return domainsobject } this is a function that is called in a nodejs project like this: domainsObject = await porkbun_api.getDomains("here goes api key", config_json_object, "randomdomain") and it prints in the console: { status: 'ERROR', message: 'All API requests require an API key.' } Please help!

i forgot to mention that i already tried to change inside header:

  • 'x-api-key': apikey
  • Authorization: 'Bearer' + apikey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party api report bugs to dns api, deploy hooks and notification hooks
Projects
None yet
Development

No branches or pull requests

9 participants