Added PGV constraint for serverName.#12967
Merged
htuch merged 2 commits intoenvoyproxy:masterfrom Sep 8, 2020
Merged
Conversation
Signed-off-by: Manish Kumar <manish.kumar1@india.nec.com>
asraa
reviewed
Sep 3, 2020
| // An optional override that the connection manager will write to the server | ||
| // header in responses. If not set, the default is *envoy*. | ||
| string server_name = 10; | ||
| string server_name = 10 [(validate.rules).string = {pattern: "^[^\000\r\n]*$"}]; |
Contributor
There was a problem hiding this comment.
nit: there is a pattern for this already HTTP_HEADER_VALUE
Contributor
Author
There was a problem hiding this comment.
I agree but the configuration should also have such constraints. Currently, server_name allow \0, \n, and \r which should not be there.
Member
There was a problem hiding this comment.
I think @asraa is suggesting to use this pattern in the validator, see
for an example.
Contributor
Author
Signed-off-by: Manish Kumar <manish.kumar1@india.nec.com>
Contributor
Author
|
/retest |
|
Retrying Azure Pipelines, to retry CircleCI checks, use |
asraa
approved these changes
Sep 8, 2020
Contributor
asraa
left a comment
There was a problem hiding this comment.
Thanks for the test as well!
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.
Signed-off-by: Manish Kumar manish.kumar1@india.nec.com
Commit Message: Added PGV constraint for serverName. It shouldn't contain \0\n\r.
Additional Description: Added PGV constraint to not allow \0\n\r in serverName.Currently, header doesn't allow \0\r\n.
Risk Level:
Testing: config_test
Docs Changes:
Release Notes:
Fixes #12709