Repository navigation
Fix Hetzner TXT quoting and Porkbun record IDs for DNS-01 - #459
Merged
Merged
Conversation
Hetzner Cloud DNS takes RRSet values in presentation form, so a DNS-01 TXT value has to be a quoted character-string (RFC 1035 section 5.1); the unquoted value was rejected or would not match on removal. Porkbun documents record IDs as strings but has sent them as numbers. Decoding into any turned a numeric ID into a float, so DNS-01 cleanup deleted /dns/delete/<zone>/1.06926659e+08 and left the TXT record behind.
This was referenced Oct 14, 2026
Merged
Owner
Author
|
Post-merge review (Gray) of #458 (dde3359) and #459 (ca5710c): LGTM, shipped in v1.7.1. Checked: Nits (non-blocking):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #458: I checked every DNS-01 and Dynamic DNS provider's request and response shapes against its published API. Two more were wrong.
Hetzner: DNS-01 TXT value not quoted
Hetzner Cloud DNS takes RRSet record values in zone-file presentation form, and its TXT docs say "The value has to be quoted."
Presentsent the bare key authorization for bothadd_recordsandremove_records. It now sendsstrconv.Quote(value), a single<character-string>per RFC 1035 §5.1. ACME values are base64url (RFC 8555 §8.4), 43 octets, so one string is always enough and needs no escaping. This matches lego's hetznerv1 provider. Dynamic DNS is unaffected because A and AAAA values aren't quoted.Porkbun: numeric record IDs became floats
The create response's
id(and theids fromretrieveByNameType) was decoded intoanyand formatted withfmt.Sprint. Porkbun's v3 spec now types it as a string, but it has been sent as a JSON number, andfmt.Sprint(float64(106926659))is1.06926659e+08. DNS-01 cleanup would then call/dns/delete/<zone>/1.06926659e+08and leave the challenge TXT record behind. Dynamic DNS edit and delete-by-ID had the same issue. AporkbunIDtype now accepts either a string or a number.Checked and fine
result.id✔domain_record.id✔recordIdtop-level on 201, DELETE 204 ✔items[], PUT replace ✔Tests
TestHetznerProviderAddsAndRemovesOnlyChallengeValuenow asserts the quoted body for both add and remove.TestPorkbunProviderCleansUpCreatedRecordByIDcovers string and numeric IDs. The Dynamic DNS duplicate test now mixes both.value":"challenge-Xy_9",delete/example.com/1.06926659e+08) and pass here.mage verifyis green.No UI changes.