-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[filters] Prevent a filter from sending local reply and continue #14416
[filters] Prevent a filter from sending local reply and continue #14416
Conversation
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Thanks for the fix! mind checking out CI and pinging back when it's sorted? |
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Just to double check, oauth2 filter sends a local reply and then sends StopAllIterationAndBuffer (the test failure). Is it possible that people can send a local reply and then continue header iteration? The most minimal constraint would be changing the condition to "don't return continue after local reply" rather than "must return stopiteration after local reply" |
I wonder if it's an attempt to drain the connection so it can be reused (for HTTP/1.1 etc.)? |
Signed-off-by: Asra Ali <asraa@google.com>
Thanks for this fix! I somehow forgot to follow-up with a fix here when we first bumped into this internally... this should be |
Which part? The Stop and Buffer as opposed to full Stop? Or continuing header iteration post local reply...? Afaik this was just a bug/omission on our side, not something to reset the connection state... |
Ah cool. If it's just broken I'd be inclined to restore your last push and fix oath upstream too, WDYT? |
This reverts commit b47f26c. Signed-off-by: Asra Ali <asraa@google.com>
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.
Oauth bits look good.. Thank you!
Sorry about the back and forth! All set with just preventing continue after a direct response. No changes to oauth2 (which maybe can be a TODO) |
Related to envoyproxy#14416. Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
…cal-reply Signed-off-by: Asra Ali <asraa@google.com>
Not sure if the wait is to update If it wasn't let me know! |
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
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.
Thanks!
* master: (30 commits) Deflaked: Guarddog_impl_test (envoyproxy#14475) [fuzz] add fuzz tests for hpack encoding and decoding (envoyproxy#13315) [filters] Prevent a filter from sending local reply and continue (envoyproxy#14416) oauth2: improving coverage (envoyproxy#14479) owners: Change dio email address (envoyproxy#14498) macos build: Fix ninja install (envoyproxy#14495) http: use OptRef helper to reduce some boilerplate (envoyproxy#14361) doc: update test/integration/README.md (envoyproxy#14485) server: wait workers to start before draining parent. (envoyproxy#14319) api: relax inline_string length limitation in DataSource (envoyproxy#14461) oauth: properly stop filter chain when a response was sent (envoyproxy#14476) listener: deprecate use_proxy_proto (envoyproxy#14406) deps: update cel and remove a patch (envoyproxy#14473) preconnect: rename: (envoyproxy#14474) coverage: ratcheting limits (envoyproxy#14472) grpc mux: fix sending node again after stream is reset (envoyproxy#14080) [test] Replace printers_include with printers_lib. (envoyproxy#14442) tcp: nodelay in the new pool (envoyproxy#14453) test: replace mock_methodn macros with mock_method (envoyproxy#14450) tcp: extending tcp integration test (envoyproxy#14451) ... Signed-off-by: Michael Puncel <mpuncel@squareup.com>
Signed-off-by: Asra Ali asraa@google.com
Commit Message: Prevent filter iteration on headers after sending a local reply and returning
FilterHeadersStatus::Continue
.Additional Description:
Before, the test hits this crash:
The downside here is
iteration_state_
isn't modified to stop iteration. I don't think this matters since it's changed toStopSingleIteration
inmaybeContinueDecoding
right after.Risk Level: Low/medium in case this changes expected filter iteration?
Testing: Added test that shows message logs and behavior passes.
Fixes part of #13737