envoyproxy/envoy
Vedi su GitHubHeaderMap: C string to string_view conversion follow ups
Open
#6580 aperta il 15 apr 2019
area/securityhelp wantedtech debt
Metriche repository
- Star
- (27.997 star)
- Metriche merge PR
- (Merge medio 8g) (378 PR mergiate in 30 g)
Descrizione
Description:
These are various places where we need to follow up to complete removal of C style strings in the header map.
HeaderString::find(const char* str)can probably be eliminated entirely by converting call sites to usegetStringView().find().StringUtil::atoullcurrently requires creation of some temporarystd::stringobjects 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 useabsl::SimpleAtoior a newStringUtilfunction that takes and returns string views.UuidUtils::uuidModBy()should be migrated to takeabsl::string_viewSpan::setOperation()should be migrated to takeabsl::string_view
Context: https://github.com/envoyproxy/envoy/issues/6494 https://github.com/envoyproxy/envoy/pull/6564
Action item for CVE-2019-9900