-
Notifications
You must be signed in to change notification settings - Fork 20
Reimplement DNS identifier validation. #95
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR reimplements DNS identifier validation to maintain compatibility with NGINX 1.29.4, which changed the signature of ngx_http_validate_host. Instead of adapting with version checks, the validation is now implemented directly in the module.
Key changes:
- Custom DNS identifier validation adhering to RFC 1123 with support for wildcards and underscore characters
- Support for wildcard DNS identifiers (e.g.,
*.example.com) - Minimum supported NGINX version updated from 1.25.0 to 1.22.0
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/conf/order.rs | Replaces ngx_http_validate_host call with custom validate_dns_identifier function implementing RFC 1123 validation with wildcard support |
| src/acme/solvers/tls_alpn.rs | Removes ngx_http_validate_host dependency, adds ASCII validation for DNS identifiers in TLS-ALPN solver |
| t/acme_conf_certificate.t | Adds test cases for invalid server name patterns |
| README.md | Updates minimum NGINX version requirement from 1.25.0 to 1.22.0 |
| .github/workflows/ci.yaml | Updates CI to test against NGINX 1.22 as the minimum supported version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fdb2ab9 to
a630129
Compare
xeioex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The signature of ngx_http_validate_host has changed in NGINX 1.29.4, breaking the build of the module. Instead of continuing to abuse an internal API and wrapping it with version check, this commit reimplements the validation in a more suitable for the module way. Notable differences from the previous behavior: - Minimal supported NGINX version is now aligned to the ngx crate: 1.22 - The new logic mostly follows ngx_http_validate_host behavior as of NGINX 1.29.4, and may reject some previously accepted values. - Wildcard DNS identifiers are now permitted. Some ACME servers allow validating wildcard identifiers with challenges other than dns-01.
27bbdde to
3dfdc61
Compare
The signature of ngx_http_validate_host has changed in NGINX 1.29.4, breaking the build of the module. Instead of continuing to abuse an internal API and wrapping it with version check, this commit reimplements the validation in a more suitable for the module way.
Notable differences from the previous behavior:
Minimal supported NGINX version is now aligned to the ngx crate: 1.22
The new logic mostly follows ngx_http_validate_host behavior as of NGINX 1.29.4, and may reject some previously accepted values.
Wildcard DNS identifiers are now permitted. Some ACME servers allow validating wildcard identifiers with challenges other than dns-01.