ext_authz: Make sure initiateCall only called once#6949
Merged
mattklein123 merged 2 commits intoenvoyproxy:masterfrom May 20, 2019
dio:fix-6787
Merged
ext_authz: Make sure initiateCall only called once#6949mattklein123 merged 2 commits intoenvoyproxy:masterfrom dio:fix-6787
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
dio:fix-6787
Conversation
After watermarked, it is possible that the decodeData will be called again. Hence, check if we have finished decoding and do initiateCall only once. Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
lizan
reviewed
May 16, 2019
| if (end_stream || isBufferFull()) { | ||
| ENVOY_STREAM_LOG(debug, "ext_authz filter finished buffering the request", *callbacks_); | ||
| initiateCall(*request_headers_); | ||
| const bool buffer_is_full = isBufferFull(); |
Member
There was a problem hiding this comment.
shall we guard this in initiateCall?
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
lizan
approved these changes
May 17, 2019
Member
gsagula
approved these changes
May 17, 2019
| } | ||
|
|
||
| void Filter::initiateCall(const Http::HeaderMap& headers) { | ||
| if (filter_return_ == FilterReturn::StopDecoding) { |
mpuncel
added a commit
to mpuncel/envoy
that referenced
this pull request
May 22, 2019
* master: (65 commits) proto: Add PATCH method to RequestMethod enum (envoyproxy#6737) exe: drop unused deps on zlib compressor code (envoyproxy#7022) coverage: fix some misc coverage (envoyproxy#7033) Enable proto schema for router_check_tool (envoyproxy#6992) stats: rework stat sink flushing to centralize counter latching (envoyproxy#6996) [test] convert lds api test config stubs to v2 (envoyproxy#7021) router: scoped rds (2c): implement scoped rds API (envoyproxy#6932) build: Add option for size-optimized binary (envoyproxy#6960) test: adding an integration test framework for file-based LDS (envoyproxy#6933) doc: update obsolete ref to api/XDS_PROTOCOL.md (envoyproxy#7002) dispatcher: faster runOnAllThreads (envoyproxy#7011) example: add csrf sandbox (envoyproxy#6805) fix syntax of gcov exclusion zone. (envoyproxy#7023) /runtime_modify: add support for query params in body (envoyproxy#6977) stats: Create stats for http codes with the symbol table. (envoyproxy#6733) health check: fix more fallout from inline deletion change (envoyproxy#6988) Max heap fix (envoyproxy#7016) Add support to unregister from lifecycle notifications (envoyproxy#6984) build spdy_core_alt_svc_wire_format (envoyproxy#7010) ext_authz: Make sure initiateCall only called once (envoyproxy#6949) ... Signed-off-by: Michael Puncel <mpuncel@squareup.com>
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.
Description:
After watermarked, it is possible that
decodeDatawill be calledagain. Hence, check if we have finished decoding and do
initiateCallonly once.
Risk Level: Low
Testing: Unit tests
Docs Changes: N/A
Release Notes: N/A
Fixes #6787
Signed-off-by: Dhi Aurrahman dio@tetrate.io