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

fix regex of matching hetzner dns api error responses #6198

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

lindsayzhou
Copy link

'"error":{[^}]*}' is a invalid regexp for busybox egrep:

$ docker run -it --rm busybox:1.36 ash
/ # echo '"error":{"details": "message"}' | /bin/busybox egrep '"error":{[^}]*}'
egrep: bad regex '"error":{[^}]*}': Invalid content of \{\}
/ # echo '"error":{"details": "message"}' | /bin/busybox egrep '"error":\{[^\}]*\}'
"error":{"details": "message"}

There is a similar and correct regexp at

acme.sh/acme.sh

Line 5074 in f981c78

error="$(echo "$response" | _egrep_o '"error":\{[^\}]*')"

Copy link

Welcome
First thing: don't send PR to the master branch, please send to the dev branch instead.
Please make sure you've read our DNS API Dev Guide and 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
We look forward to reviewing your Pull request shortly ✨
注意: 必须通过了 DNS-API-Test 才会被 review. 无论是修改, 还是新加的 dns api, 都必须确保通过这个测试.

@lindsayzhou
Copy link
Author

This is a pretty small PR.
Should this also run DNS-API-TEST ?

@lindsayzhou lindsayzhou force-pushed the fix-dns-netzner-error-regexp branch from 67ce457 to 6c555cb Compare January 13, 2025 03:11
@lindsayzhou lindsayzhou marked this pull request as draft January 13, 2025 04:51
@lindsayzhou
Copy link
Author

OK, there are other issues on OpenBSD: https://github.com/lindsayzhou/acme.sh/actions/runs/12739946412/job/35506131990#step:4:1880

I'll fix it in my spare time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant