Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

refactor(security): use blob instead of std::string as the type for msg member of negotiationi_request #622

Merged
merged 3 commits into from
Sep 10, 2020

Conversation

levy5307
Copy link
Contributor

@levy5307 levy5307 commented Sep 10, 2020

Previously, we use std::string as the type for msg member of negotiation_request and negotiation_response.
But as we known, std::string in cpp is not binary safe, so if we pass some special character(like '\0'), this string will be incorrect.
And in negotiation process, auth token transfered between server_negotiation and client_negotiation may have these special characters mentioned above.
So in this pull request, I change to use blob instead of std::string

@neverchanje neverchanje merged commit 8ec8ba6 into XiaoMi:master Sep 10, 2020
@levy5307 levy5307 deleted the use-blob branch September 10, 2020 08:47
levy5307 added a commit to levy5307/rdsn that referenced this pull request Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants