diff options
author | Brad King <brad.king@kitware.com> | 2016-10-24 14:44:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-10-24 18:36:13 (GMT) |
commit | 9b8dc79cc84d12c1e661ca3cd77b773b463508d7 (patch) | |
tree | a0db36834af7c2c137beec99271965cb0ab5bc77 /Source | |
parent | 48189697eb2ac97407cf4ffc0d2f3e600f3cd6ac (diff) | |
download | CMake-9b8dc79cc84d12c1e661ca3cd77b773b463508d7.zip CMake-9b8dc79cc84d12c1e661ca3cd77b773b463508d7.tar.gz CMake-9b8dc79cc84d12c1e661ca3cd77b773b463508d7.tar.bz2 |
cmake-server: Change message wrapper to avoid ambiguity with content
Change our message wrapper from
[== CMake Server ==[ ... ]== CMake Server ==]
to
[== "CMake Server" ==[ ... ]== "CMake Server" ==]
to guarantee that no JSON content can ever contain the ending string
(because it would be encoded as `]== \"CMake Server\" ==]`).
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmServerDictionary.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmServerDictionary.h b/Source/cmServerDictionary.h index c82274a..2d64cbd 100644 --- a/Source/cmServerDictionary.h +++ b/Source/cmServerDictionary.h @@ -87,8 +87,8 @@ static const std::string kWARN_UNUSED_KEY = "warnUnused"; static const std::string kWATCHED_DIRECTORIES_KEY = "watchedDirectories"; static const std::string kWATCHED_FILES_KEY = "watchedFiles"; -static const std::string kSTART_MAGIC = "[== CMake Server ==["; -static const std::string kEND_MAGIC = "]== CMake Server ==]"; +static const std::string kSTART_MAGIC = "[== \"CMake Server\" ==["; +static const std::string kEND_MAGIC = "]== \"CMake Server\" ==]"; static const std::string kRENAME_PROPERTY_VALUE = "rename"; static const std::string kCHANGE_PROPERTY_VALUE = "change"; |