Merge pull request #5838 from maxsam4/useLiteralContent-patch

useLiteralContent data validation
This commit is contained in:
chriseth
2019-01-23 10:35:32 +01:00
committed by GitHub
7 changed files with 46 additions and 0 deletions
@@ -298,6 +298,8 @@ boost::optional<Json::Value> checkOptimizerKeys(Json::Value const& _input)
boost::optional<Json::Value> checkMetadataKeys(Json::Value const& _input)
{
if (_input.isObject() && _input.isMember("useLiteralContent") && !_input["useLiteralContent"].isBool())
return formatFatalError("JSONError", "\"settings.metadata.useLiteralContent\" must be Boolean");
static set<string> keys{"useLiteralContent"};
return checkKeys(_input, keys, "settings.metadata");
}