wfe: check well-formedness of requested names early#7530
Merged
Conversation
e64716b to
d583df5
Compare
Contributor
Author
|
Spurious test failure from govulncheck because there's a security release of Go (1.22.4) and (I think) GitHub's concept of the "latest" Go version hasn't updated yet. |
aarongable
previously approved these changes
Jun 5, 2024
| // breaking queries. | ||
| // domain names. | ||
| // | ||
| // It checks the criteria checked by `WellFormed`, and additionally checks whether |
Contributor
There was a problem hiding this comment.
Suggested change
| // It checks the criteria checked by `WellFormed`, and additionally checks whether | |
| // It checks the criteria checked by `WellFormedDomainNames`, and additionally checks whether |
aarongable
previously approved these changes
Jun 5, 2024
pgporada
reviewed
Jun 5, 2024
aarongable
approved these changes
Jun 6, 2024
beautifulentropy
approved these changes
Jun 10, 2024
pgporada
approved these changes
Jun 10, 2024
pgporada
added a commit
that referenced
this pull request
Jun 20, 2024
In #7530, `wfe.NewOrder` [began constructing a rate limit transaction](https://github.com/letsencrypt/boulder/pull/7530/files#diff-3f950e720c205ce9fa8dea12c6fd7fd44272c2671f19d0e06962abfbea00d491R2340-R2344) with a precondition that all names must be lower-cased, however the actual implementation of the precondition was accidentally overlooked. This fix corrects that and adds a unit test to prevent a future regression. Other changes: - Only normalized names count towards max names limit - Only normalized names will be logged in the web.RequestEvent --------- Co-authored-by: Samantha Frank <hello@entropy.cat>
pgporada
added a commit
that referenced
this pull request
Jun 20, 2024
In #7530, `wfe.NewOrder` [began constructing a rate limit transaction](https://github.com/letsencrypt/boulder/pull/7530/files#diff-3f950e720c205ce9fa8dea12c6fd7fd44272c2671f19d0e06962abfbea00d491R2340-R2344) with a precondition that all names must be lower-cased, however the actual implementation of the precondition was accidentally overlooked. This fix corrects that and adds a unit test to prevent a future regression. Other changes: - Only normalized names count towards max names limit - Only normalized names will be logged in the web.RequestEvent --------- Co-authored-by: Samantha Frank <hello@entropy.cat>
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.
This allows us to give a user-meaningful error about malformed names early on, instead of propagating internal errors from the new rate limiting system.
This moves the well-formedness logic from
WillingToIssueinto a new functionWellFormedDomainNames, which callsValidDomainon each name and combines the errors into suberrors if there is more than one.WillingToIssuenow callsWellFormedDomainNamesto keep the existing behavior. Additionally, WFE callsWellFormedDomainNamesbefore checking rate limits.This creates a slight behavior change: If an order contains both malformed domain names and wellformed but blocked domain names, suberrors will only be generated for the malformed domain names. This is reflected in the changes to
TestWillingToIssue_Wildcard.Adds a WFE test case for receiving malformed identifiers in a new-order request.
Follows up on #3323 and #7218
Fixes #7526
Some small incidental fixes:
pa.blocklistfornilbefore accessingpa.wildcardExactBlocklist. Fix that.