mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-23 21:17:16 +00:00
[Databuckets] Nested Databuckets Protections and Improvements (#4748)
* Check for valid JSON before using it * Do not allow nested keys to set be set an expiration * Prevent overwriting of existing object or array * Nested deletion support * Update data_bucket.cpp * Test cases * More test cases, fix * Update databuckets.cpp * Update databuckets.cpp * Basic databucket tests * Update databuckets.cpp * Update databuckets.cpp
This commit is contained in:
1 parent
3638d157b2
commit
0615864d51
8 files changed
+422
-52
No files matched your search
@@ -936,3 +936,11 @@ std::string Strings::Slugify(const std::string& input, const std::string& separa
|
||||
|
||||
return slug;
|
||||
}
|
||||
|
||||
bool Strings::IsValidJson(const std::string &json)
|
||||
{
|
||||
rapidjson::Document doc;
|
||||
rapidjson::ParseResult result = doc.Parse(json.c_str());
|
||||
|
||||
return result;
|
||||
}
|
||||
Reference in new issue
Block a user