Repository navigation
fix: only check the recursive resolvers when the certificate asks for it - #3
Merged
Merged
Conversation
NGINX UI 2.x waited for the authoritative nameservers only, because local resolvers such as systemd-resolved at 127.0.0.53 often do not return a fresh TXT record in time (0xJacky/nginx-ui#1711, #1719). The plugin also checked the recursive resolvers unless the certificate turned that off, so DNS-01 issuance that worked on 2.x stalled after the upgrade. dns01.check now skips the recursive resolvers unless disable_recursive_ns_propagation is explicitly false. The challenge form starts with "Check public resolvers" off, reads a missing option as off, and lists the switch in the summary only when it differs from that default. Refs 0xJacky/nginx-ui#2115 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed wait Review of the previous commit found two problems: - The 1.0.0 challenge form wrote disable_recursive_ns_propagation: false for every certificate it saved, so reading an explicit false as opt-in kept the recursive check on for exactly those certificates. The check is now turned on by check_recursive_ns_propagation, and the older option can only keep it off. - With the authoritative check off and the recursive check now off by default, check.Propagated reported the record ready at once. dns01.check now answers unsupported when both checks are off, so NGINX UI waits its fixed 60 seconds first, as the challenge form says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
NGINX UI 2.x waited only for the authoritative nameservers during DNS-01, because local resolvers such as systemd-resolved at
127.0.0.53often do not return a fresh TXT record in time (0xJacky/nginx-ui#1711, #1719). This plugin also checked the recursive resolvers unless the certificate turned that off, so issuance that worked on 2.x stalled after the upgrade withrecursive nameservers: NS 127.0.0.53:53 did not return the expected TXT record(0xJacky/nginx-ui#2115).Fix
dns01.checkqueries the recursive resolvers only when the certificate sets the new optioncheck_recursive_ns_propagation: true. The olderdisable_recursive_ns_propagationcan only keep the check off: the 1.0.0 form wrotefalsefor every certificate it saved, so treating that as opt-in would have kept the stall for them.dns01.checkanswers unsupported, so NGINX UI falls back to its fixed 60-second wait before validation (what the form's "When off, waits a fixed 60 seconds" says). Without this, the record would be reported ready at once.Tests
TestCheckSkipsRecursiveResolversByDefaultgoes throughHandler.Checkwith a recursive resolver that refuses every query. Onmainit fails (Detail = "recursive nameservers: DNS call to 127.0.0.1:1 failed ..."); here the check goes on to the authoritative nameservers.TestCheckWithBothChecksOffDefersToTheHostfails on this branch's first commit (record reported ready at once) and passes now.go test -race -count=1 ./...ok onmainand here;gofmt,go vet, webappvue-tscand build,plugin.jsoncheck clean.🤖 Generated with Claude Code