-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate disabling HTTP header validation (#13609)
Motivation: HTTP request/response splitting is a serious vulnerability, which is mitigated by enabling HTTP header validation. We already do header validation by default, but we have many constructors in our HTTP codec that permit turning it off. We should discourage all our down-stream users from turning header validation off. Modification: - Deprecate all constructors in our HTTP codec, that allow header validation to be turned off. - Offer alternative constructors to all the newly deprecated ones, where header validation is enabled. - Trailer validation in `DefaultLastHttpContent` is now enabled by default in the `DefaultLastHttpContent(ByteBuf, HttpHeaders)` constructor (Behavioral change!) - Add better constructors, and more guidance in the javadocs, for `DefaultHttpHeaders` for those who want to use custom header validators. Result: We hopefully encourage integrators to validate headers. And we hopefully get fewer issues reported about disabled header validation when people run security scanners on their code.
- Loading branch information
Showing
27 changed files
with
1,423 additions
and
245 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.