Skip to content
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

api: relax inline_string length limitation in DataSource #14461

Merged
merged 2 commits into from
Dec 19, 2020

Conversation

lizan
Copy link
Member

@lizan lizan commented Dec 17, 2020

As discussed in #14276, relax the min length requirement of inline_string in DataSource. It should checked after DataSource since an empty file could pass validation.

Risk Level: Low
Testing: integration test
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Lizan Zhou [email protected]

@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
API shepherd assignee is @htuch
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #14461 was opened by lizan.

see: more, trace.

@lizan lizan changed the title api: relex inline_string length limitation in DataSource api: relax inline_string length limitation in DataSource Dec 17, 2020
}
if (!allow_empty && data.empty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this start enforcing allow_empty on the kFilename case where it didn't previously?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes and this is intended in that way. I took quick look on existing use and mostly are allowing empty so this shouldn't be a big issue.

esmet
esmet previously approved these changes Dec 17, 2020
Copy link
Contributor

@esmet esmet left a comment

Choose a reason for hiding this comment

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

Looks good

@@ -334,7 +334,7 @@ message DataSource {
bytes inline_bytes = 2 [(validate.rules).bytes = {min_len: 1}];

// String inlined in the configuration.
string inline_string = 3 [(validate.rules).string = {min_len: 1}];
string inline_string = 3;
Copy link
Member

Choose a reason for hiding this comment

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

Should we also relax on inline_bytes?

Signed-off-by: Lizan Zhou <[email protected]>
@mattklein123 mattklein123 merged commit 239013e into envoyproxy:master Dec 19, 2020
mpuncel added a commit to mpuncel/envoy that referenced this pull request Dec 22, 2020
* 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 <[email protected]>
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.

4 participants