Skip to content

Commit

Permalink
runtime: cleanup strict_authority_validation (envoyproxy#12119)
Browse files Browse the repository at this point in the history
Fixes envoyproxy#11934

Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Kevin Baichoo <[email protected]>
  • Loading branch information
mattklein123 authored and KBaichoo committed Jul 30, 2020
1 parent f788c62 commit 68f010d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Removed Config or Runtime

* http: removed legacy header sanitization and the runtime guard `envoy.reloadable_features.strict_header_validation`.
* http: removed legacy transfer-encoding enforcement and runtime guard `envoy.reloadable_features.reject_unsupported_transfer_encodings`.
* http: removed configurable strict host validation and runtime guard `envoy.reloadable_features.strict_authority_validation`.

New Features
------------
Expand Down
3 changes: 1 addition & 2 deletions source/common/http/header_utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ void HeaderUtility::stripPortFromHost(RequestHeaderMap& headers, uint32_t listen
absl::optional<std::reference_wrapper<const absl::string_view>>
HeaderUtility::requestHeadersValid(const RequestHeaderMap& headers) {
// Make sure the host is valid.
if (Runtime::runtimeFeatureEnabled("envoy.reloadable_features.strict_authority_validation") &&
headers.Host() && !HeaderUtility::authorityIsValid(headers.Host()->value().getStringView())) {
if (headers.Host() && !HeaderUtility::authorityIsValid(headers.Host()->value().getStringView())) {
return SharedResponseCodeDetails::get().InvalidAuthority;
}
return absl::nullopt;
Expand Down
1 change: 0 additions & 1 deletion source/common/runtime/runtime_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ constexpr const char* runtime_features[] = {
"envoy.reloadable_features.http1_flood_protection",
"envoy.reloadable_features.test_feature_true",
"envoy.reloadable_features.connection_header_sanitization",
"envoy.reloadable_features.strict_authority_validation",
// Begin alphabetically sorted section.
"envoy.reloadable_features.activate_fds_next_event_loop",
"envoy.deprecated_features.allow_deprecated_extension_names",
Expand Down

0 comments on commit 68f010d

Please sign in to comment.