diff --git a/services/distributeddataservice/service/data_share/gaussdb_rd_simple/src/executor/document/document_check.cpp b/services/distributeddataservice/service/data_share/gaussdb_rd_simple/src/executor/document/document_check.cpp index ec4a6436bbc2a11c450086926ed9fe026ecb1364..cc4b01b2455abca5268fe6780dd1dbe31ad6d9f0 100644 --- a/services/distributeddataservice/service/data_share/gaussdb_rd_simple/src/executor/document/document_check.cpp +++ b/services/distributeddataservice/service/data_share/gaussdb_rd_simple/src/executor/document/document_check.cpp @@ -111,9 +111,12 @@ int CheckCommon::CheckFilter(JsonObject &filterObj, bool &isOnlyId, std::vector< isOnlyId = false; } for (int i = 0; i < filterPath.size(); i++) { + if (filterPath[i].empty()) { + return -E_INVALID_JSON_FORMAT; + } for (int j = 0; j < filterPath[i].size(); j++) { - if (filterPath[i].empty()) { - return -E_INVALID_JSON_FORMAT; + if (filterPath[i][j].empty()) { + return -E_INVALID_ARGS; } for (auto oneChar : filterPath[i][j]) { if (!((isalpha(oneChar)) || (isdigit(oneChar)) || ('_' == oneChar))) { @@ -258,6 +261,9 @@ int CheckCommon::CheckUpdata(JsonObject &updataObj, std::vector