diff options
author | Julien Boeuf <jboeuf@google.com> | 2015-09-22 13:31:16 -0700 |
---|---|---|
committer | Julien Boeuf <jboeuf@google.com> | 2015-09-22 13:31:16 -0700 |
commit | 8b0b6f413d3cd8f16f13e26f401b838b859d1ed6 (patch) | |
tree | f705c66d328c92046030b3fe563d4e10cbf151f6 /include/grpc++/security | |
parent | e456f77644e5ef5b60c7332136047ab3f5d4454e (diff) |
It is a bad idea to have a map with string_refs as output params.
This is very much unsafe as the string_ref could point on a stack
variable of the callee.
Diffstat (limited to 'include/grpc++/security')
-rw-r--r-- | include/grpc++/security/auth_metadata_processor.h | 2 | ||||
-rw-r--r-- | include/grpc++/security/credentials.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/grpc++/security/auth_metadata_processor.h b/include/grpc++/security/auth_metadata_processor.h index 18ad922321..9b9c06e3b6 100644 --- a/include/grpc++/security/auth_metadata_processor.h +++ b/include/grpc++/security/auth_metadata_processor.h @@ -45,7 +45,7 @@ namespace grpc { class AuthMetadataProcessor { public: typedef std::multimap<grpc::string_ref, grpc::string_ref> InputMetadata; - typedef std::multimap<grpc::string, grpc::string_ref> OutputMetadata; + typedef std::multimap<grpc::string, grpc::string> OutputMetadata; virtual ~AuthMetadataProcessor() {} diff --git a/include/grpc++/security/credentials.h b/include/grpc++/security/credentials.h index fafcfdc906..ff41bc597e 100644 --- a/include/grpc++/security/credentials.h +++ b/include/grpc++/security/credentials.h @@ -180,7 +180,7 @@ class MetadataCredentialsPlugin { // Gets the auth metatada produced by this plugin. virtual Status GetMetadata( grpc::string_ref service_url, - std::multimap<grpc::string, grpc::string_ref>* metadata) = 0; + std::multimap<grpc::string, grpc::string>* metadata) = 0; }; std::shared_ptr<Credentials> MetadataCredentialsFromPlugin( |