envoyproxy/envoy

HeaderMap: C string to string_view conversion follow ups

Open

#6,580 opened on 2019年4月15日

GitHub で見る
 (16 comments) (0 reactions) (1 assignee)C++ (5,373 forks)batch import
area/securityhelp wantedtech debt

Repository metrics

Stars
 (27,997 stars)
PR merge metrics
 (平均マージ 8d) (30d で 378 merged PRs)

説明

Description:

These are various places where we need to follow up to complete removal of C style strings in the header map.

  1. HeaderString::find(const char* str) can probably be eliminated entirely by converting call sites to use getStringView().find().
  2. StringUtil::atoull currently requires creation of some temporary std::string objects because it expects C strings, and also returns a C style string. Most call sites ignore the return value, so they can be converted to use absl::SimpleAtoi or a new StringUtil function that takes and returns string views.
  3. UuidUtils::uuidModBy() should be migrated to take absl::string_view
  4. Span::setOperation() should be migrated to take absl::string_view

Context: https://github.com/envoyproxy/envoy/issues/6494 https://github.com/envoyproxy/envoy/pull/6564

Action item for CVE-2019-9900

コントリビューターガイド