Skip to content

Commit

Permalink
Proto string issue fix (envoyproxy#4320)
Browse files Browse the repository at this point in the history
 Google proto string incompatibility fix.
Risk Level: Low
Testing: N/A
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Matt Rice <mattrice@google.com>
  • Loading branch information
mrice32 authored and htuch committed Aug 31, 2018
1 parent 9c492a0 commit 42f6048
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/common/secret/sds_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ void SdsApi::onConfigUpdate(const ResourceVector& resources, const std::string&)
}
const auto& secret = resources[0];
MessageUtil::validate(secret);
if (secret.name() != sds_config_name_) {

// Wrap sds_config_name_ in string_view to deal with proto string/std::string incompatibility
// issues within Google.
if (secret.name() != absl::string_view(sds_config_name_)) {
throw EnvoyException(
fmt::format("Unexpected SDS secret (expecting {}): {}", sds_config_name_, secret.name()));
}
Expand Down

0 comments on commit 42f6048

Please sign in to comment.