Skip to content

String matcher max length field #39191

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

Open
jh125486 opened this issue Apr 21, 2025 · 3 comments
Open

String matcher max length field #39191

jh125486 opened this issue Apr 21, 2025 · 3 comments
Labels
area/matching enhancement Feature requests. Not bugs or questions.

Comments

@jh125486
Copy link
Contributor

Title: Add a max length field to String Matcher

Description:

Currently we use a regex to limit the max header length, but a simpler "max length" field would reduce the need for initializing the RegexMatcher.

Protobuf in question: string.proto

@jh125486 jh125486 added enhancement Feature requests. Not bugs or questions. triage Issue requires triage labels Apr 21, 2025
@kyessenov
Copy link
Contributor

+1 sounds like a good idea to me. Another place to add this could be in https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/http/header_validators. If the motivation is to reduce overall header data, it might be better to enforce that at the protocol level.

@kyessenov kyessenov added area/matching and removed triage Issue requires triage labels Apr 21, 2025
@jh125486
Copy link
Contributor Author

+1 sounds like a good idea to me. Another place to add this could be in https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/http/header_validators. If the motivation is to reduce overall header data, it might be better to enforce that at the protocol level.

We're specifically trying to limit the length of XFF headers to avoid infinite forwarding loops by returning a 431, so maybe?

@jh125486
Copy link
Contributor Author

jh125486 commented May 12, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/matching enhancement Feature requests. Not bugs or questions.
Projects
None yet
Development

No branches or pull requests

2 participants