mirror of
https://github.com/openharmony/commonlibrary_utils_lite.git
synced 2026-07-20 22:59:03 -04:00
update js/builtin/filekit/src/nativeapi_fs.cpp.
utils入参判断条件优化
This commit is contained in:
@@ -42,6 +42,9 @@ bool IsValidPath(const char* path)
|
||||
if ((strstr(path, "/./") != nullptr) || (strstr(path, "/../") != nullptr)) {
|
||||
return false;
|
||||
}
|
||||
if (strpbrk(path + PREFIX_LEN, "\"*+,:;<=>\?[]|\x7F")) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user