Skip to content

[config] Add basic config validators for path rewrite, host rewrite and redirect actions#10367

Merged
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
antoniovicente:path_rewrite_validation
Mar 15, 2020
Merged

[config] Add basic config validators for path rewrite, host rewrite and redirect actions#10367
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
antoniovicente:path_rewrite_validation

Conversation

@antoniovicente
Copy link
Copy Markdown
Contributor

Description: Reject path rewrite, host rewrite and redirect config fields that contain \0, \r or \n characters. This provides some basic protection against config errors that could result in problems due to the proxy, upstream and downstream disagreeing about the contents of headers.
Risk Level: medium
Testing: Added config tests that trigger on the new validations
Docs Changes: n/a
Release Notes: TBD
Fixes #10332

…ct actions that reject \0, \r and \n characters.

Signed-off-by: Antonio Vicente <avd@google.com>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #10367 was opened by antoniovicente.

see: more, trace.

@lizan
Copy link
Copy Markdown
Member

lizan commented Mar 12, 2020

/azp run envoy-windows

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@alyssawilk
Copy link
Copy Markdown
Contributor

cc @htuch @lizan for API policy review.

Signed-off-by: Antonio Vicente <avd@google.com>
@antoniovicente
Copy link
Copy Markdown
Contributor Author

First CI attempt failed due to gitdb package being too old. Now the mac CI failed while installing dependencies.

I'll kick it again sometime later.

@htuch htuch self-assigned this Mar 13, 2020
Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mattklein123 mattklein123 merged commit 1d751a5 into envoyproxy:master Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[config] Weak validation of prefix_rewrite and host_rewrite allows config inputs that trigger ASSERT failures while proxying

6 participants