mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
Signed-off-by: huangshiwei <huangshiwei4@huawei.com>
This commit is contained in:
@@ -10529,6 +10529,9 @@ bool AbilityManagerService::ParseJsonFromBoot(nlohmann::json jsonObj, const std:
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!jsonObj.contains("exposed_white_list")) {
|
||||
return false;
|
||||
}
|
||||
nlohmann::json exportWhiteJsonList = jsonObj["exposed_white_list"];
|
||||
for (const auto& it : exportWhiteJsonList) {
|
||||
if (it.is_string()) {
|
||||
|
||||
@@ -262,10 +262,16 @@ bool DeepLinkReserveConfig::ReadFileInfoJson(const std::string &filePath, nlohma
|
||||
return false;
|
||||
}
|
||||
|
||||
char path[PATH_MAX] = {0};
|
||||
if (realpath(filePath.c_str(), path) == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "realpath error, errno is %{public}d.", errno);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::fstream in;
|
||||
char errBuf[256];
|
||||
errBuf[0] = '\0';
|
||||
in.open(filePath, std::ios_base::in);
|
||||
in.open(path, std::ios_base::in);
|
||||
if (!in.is_open()) {
|
||||
strerror_r(errno, errBuf, sizeof(errBuf));
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "the file cannot be open due to %{public}s", errBuf);
|
||||
|
||||
@@ -156,7 +156,13 @@ bool ParserUtil::ReadFileIntoJson(const std::string &filePath, nlohmann::json &j
|
||||
return false;
|
||||
}
|
||||
|
||||
std::ifstream fin(filePath);
|
||||
char path[PATH_MAX] = {0};
|
||||
if (realpath(filePath.c_str(), path) == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "realpath error, errno is %{public}d.", errno);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::ifstream fin(path);
|
||||
if (!fin.is_open()) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "File path exception.");
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user