Repository navigation
Follow-ups from #122: name validation, race handling, httpreq append - #126
Merged
Merged
Conversation
Names from requests were only lowercased and stripped of trailing dots before being used in Hetzner API paths, which are built without escaping. Validate them against hostname rules in SplitFQDN, allowing '*' only as the leftmost label. The acmedns binder validates again after adding the _acme-challenge prefix. Fixes #124 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: 0xFelix <felix@matouschek.org>
Deduplicate waiting for actions in the updater and the cleaner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: 0xFelix <felix@matouschek.org>
The name now matches the API call it wraps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: 0xFelix <felix@matouschek.org>
Two concurrent presents for the same new RRSet both tried to create it, so the second one failed with 500. After a failed create, look up the RRSet again and apply the value to it if it exists now. If a conflicting RRSet was created instead, respond with 409. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: 0xFelix <felix@matouschek.org>
Present replaced the whole RRSet while cleanup removed only the given value. With lego, issuing a certificate for example.com and *.example.com presents two values for the same name before validating, so the second present overwrote the first. Append the value instead and document the present and cleanup behavior of all endpoints. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: 0xFelix <felix@matouschek.org>
QuoteIfRequired used strconv.Quote, which escapes control characters Go-style (e.g. \x01). Escape them as \DDD as defined by RFC 1035. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: 0xFelix <felix@matouschek.org>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: 0xFelix <felix@matouschek.org>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: 0xFelix <felix@matouschek.org>
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.
Summary
*only as the leftmost label (Request names are not validated before they are used in Hetzner API paths #124)/httpreq/presentappends TXT values, so apex and wildcard challenges can coexist; document present/cleanup behavior per endpoint\DDDinstead of Go-style\x01hetzner.WaitForAction, renameupdateRRSettosetRRSetRecordsRRSetTypeFromString, addrecordsto AGENTS.mdUnknown JSON keys are still accepted, rejecting them could break existing clients.
Tested against the live API
409 uniqueness_error, a CNAME next to another type returns422 invalid_input. Both are handled by the retry.\x01in a TXT value was served as the literalx01,\001is served as byte 0x01.Closes #123
Closes #124
🤖 Generated with Claude Code