diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index d0933cfacfd3d..e7959190ac149 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -43,10 +43,10 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://commondatastorage.googleapis.com/chromium-boringssl-docs/fips/boringssl-66005f41fbc3529ffe8d007708756720529da20d.tar.xz"], ), com_google_absl = dict( - sha256 = "190b0c9e65ef0866b44c54b517b5a3e15b67a1001b34547f03f8f4d8553c2851", - strip_prefix = "abseil-cpp-63ee2f8877915a3565c29707dba8fe4d7822596a", - # 2020-01-08 - urls = ["https://github.com/abseil/abseil-cpp/archive/63ee2f8877915a3565c29707dba8fe4d7822596a.tar.gz"], + sha256 = "2693730730247afb0e7cb2d41664ac2af3ad75c79944efd266be40ba944179b9", + strip_prefix = "abseil-cpp-06f0e767d13d4d68071c4fc51e25724e0fc8bc74", + # 2020-03-03 + urls = ["https://github.com/abseil/abseil-cpp/archive/06f0e767d13d4d68071c4fc51e25724e0fc8bc74.tar.gz"], ), com_github_apache_thrift = dict( sha256 = "7d59ac4fdcb2c58037ebd4a9da5f9a49e3e034bf75b3f26d9fe48ba3d8806e6b", @@ -275,10 +275,10 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://storage.googleapis.com/quiche-envoy-integration/38cc1ee6a89a4d0b52cf2a611bdc09312bcd2c5c.tar.gz"], ), com_google_cel_cpp = dict( - sha256 = "b4eaf871d4910c599bb70eaef2eec852747989f15f26885353b7c5188a940ca8", - strip_prefix = "cel-cpp-4767e5de36c5701fa8ea46d7de3765161ef98353", - # 2019-11-28 - urls = ["https://github.com/google/cel-cpp/archive/4767e5de36c5701fa8ea46d7de3765161ef98353.tar.gz"], + sha256 = "326ec397b55e39f48bd5380ccded1af5b04653ee96e769cd4d694f9a3bacef50", + strip_prefix = "cel-cpp-80e1cca533190d537a780ad007e8db64164c582e", + # 2020-02-26 + urls = ["https://github.com/google/cel-cpp/archive/80e1cca533190d537a780ad007e8db64164c582e.tar.gz"], ), com_googlesource_code_re2 = dict( sha256 = "7268e1b4254d9ffa5ccf010fee954150dbb788fd9705234442e7d9f0ee5a42d3", diff --git a/source/common/http/utility.cc b/source/common/http/utility.cc index d755568393558..82c5f3ff11088 100644 --- a/source/common/http/utility.cc +++ b/source/common/http/utility.cc @@ -782,7 +782,8 @@ Utility::AuthorityAttributes Utility::parseAuthority(absl::string_view host) { // but we still need to trim the brackets to send the IPv6 address into the DNS resolver. For // now, just do all the trimming here, but in the future we should consider whether we can // have unified [] handling as low as possible in the stack. - if (potential_ip_address.front() == '[' && potential_ip_address.back() == ']') { + if (!potential_ip_address.empty() && potential_ip_address.front() == '[' && + potential_ip_address.back() == ']') { potential_ip_address.remove_prefix(1); potential_ip_address.remove_suffix(1); } diff --git a/test/common/http/utility_test.cc b/test/common/http/utility_test.cc index 91c446d69014d..8e5f41750da9e 100644 --- a/test/common/http/utility_test.cc +++ b/test/common/http/utility_test.cc @@ -778,7 +778,8 @@ TEST(HttpUtility, CheckIsIpAddress) { std::make_tuple(false, "example.com:8000", "example.com", 8000), std::make_tuple(false, "example.com:abc", "example.com:abc", absl::nullopt), std::make_tuple(false, "localhost:10000", "localhost", 10000), - std::make_tuple(false, "localhost", "localhost", absl::nullopt)}; + std::make_tuple(false, "localhost", "localhost", absl::nullopt), + std::make_tuple(false, "", "", absl::nullopt)}; for (const auto& pattern : patterns) { bool status_pattern = std::get<0>(pattern);