forked from eclipse-ee4j/grizzly
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fish 9690 filtering incorrect characters header validation rfc 9110 #42
Merged
breakponchito
merged 16 commits into
payara:4.0.0.payara-maintenance
from
breakponchito:FISH-9690-filtering-incorrect-characters-header-validation-rfc-9110
Dec 12, 2024
Merged
Fish 9690 filtering incorrect characters header validation rfc 9110 #42
breakponchito
merged 16 commits into
payara:4.0.0.payara-maintenance
from
breakponchito:FISH-9690-filtering-incorrect-characters-header-validation-rfc-9110
Dec 12, 2024
Conversation
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
…alidation against invalid characters RFC-9110
+ Added the validation of HTTP header values + Name and value's validation are provided as options. (Improved based on carryel#1 @breakponchito)
+ trivial) updated license and re-trigger status checks(eclipse-ee4j#2213).
Signed-off-by: Andrew Pielage <[email protected]>
Pandrex247
approved these changes
Dec 11, 2024
luiseufrasio
approved these changes
Dec 12, 2024
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.
LGTM!
breakponchito
merged commit Dec 12, 2024
7c25fc1
into
payara:4.0.0.payara-maintenance
2 checks passed
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 is a PR to include new properties on the grizzly implementation to enable Header Name and Header Value validation against invalid characters mentioned on the RFC-9110, here the reference of the reported issue: Glassfish issue and here the reserved CVE CVE-2024-45687
To test this set the dependency version on the payara server: 4.0.2.payara-p2 build and run
deploy the following reproducer:
ReproducerJDK11.zip
By default grizzly is setting two new properties that enable the validation of the headers by default. You can customize this behavior by seeting the following properties from UI or by cli command o directly on the domain.xml file
asadmin create-jvm-options --target=server-config "-Dorg.glassfish.grizzly.http.STRICT_HEADER_NAME_VALIDATION_RFC_9110\=true"
asadmin create-jvm-options --target=server-config "-Dorg.glassfish.grizzly.http.STRICT_HEADER_VALUE_VALIDATION_RFC_9110\=true"
after adding the properties you need to restart the server
by default on the grizzly side those properties are set as true
deploy the reproducer and make curl calls
Header Name Validation tests:
the result of any of those test should be error 400:
this will return status 200 but the header will be discarted because of the \0 character
Header Value Validations tests:
The \0 is immediately not processed from curl because by default we can't consider that character on the request headers and the the \r and \n characters are not permitted alone on the header value content