Commit 42925d8a authored by Jon Mann's avatar Jon Mann Committed by Commit Bot

[NetworkIdentifier] Use a more unique delimiter.

When separating ssid from security type in a serialized network
identifier, we were previously using an underscore.  Since this is an
allowed character in SSIDs, it's safer to use something more unique.

Bug: 966270
Change-Id: I3aac88bd3fc0cfa6058b021892a697e09b271cfb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1992585Reviewed-by: default avatarAzeem Arshad <azeemarshad@chromium.org>
Commit-Queue: Jon Mann <jonmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#729921}
parent 81fcb61e
......@@ -18,7 +18,7 @@ namespace sync_wifi {
namespace {
const char kDelimeter[] = "_";
const char kDelimeter[] = "<||>";
} // namespace
......
......@@ -39,7 +39,7 @@ TEST_F(NetworkIdentifierTest, FromProto) {
}
TEST_F(NetworkIdentifierTest, FromString) {
std::string string_id("0123456789ABCDEF_psk");
std::string string_id("0123456789ABCDEF<||>psk");
NetworkIdentifier id = NetworkIdentifier::DeserializeFromString(string_id);
EXPECT_EQ(kHexSsid, id.hex_ssid());
EXPECT_EQ(shill::kSecurityPsk, id.security_type());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment