Skip to content

Commit 8b06e08

Browse files
committed
remove absolute path check
1 parent 223b119 commit 8b06e08

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

src/pb_utils.cc

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -339,21 +339,6 @@ IsValidIdentifier(const std::string& input)
339339
return true;
340340
}
341341

342-
bool
343-
IsValidPath(const std::string& path)
344-
{
345-
if (path.empty()) {
346-
return false;
347-
}
348-
349-
// Must be absolute path
350-
if (path[0] != '/') {
351-
return false;
352-
}
353-
354-
return true;
355-
}
356-
357342
bool
358343
IsExecutableFile(const std::string& filepath)
359344
{

src/pb_utils.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,6 @@ constexpr const char* INVALID_CHARS = ";|&$`<>()[]{}\\\"'*?~#!";
349349
// Validate that an identifier (model name, region name, etc.)
350350
bool IsValidIdentifier(const std::string& input);
351351

352-
// Validate that a path exists and is absolute
353-
bool IsValidPath(const std::string& path);
354-
355352
// Check if a file exists and is executable
356353
bool IsExecutableFile(const std::string& filepath);
357354

src/stub_launcher.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,6 @@ StubLauncher::Launch()
346346
"Invalid stub name: contains invalid characters");
347347
}
348348

349-
if (!IsValidPath(model_path_)) {
350-
return TRITONSERVER_ErrorNew(
351-
TRITONSERVER_ERROR_INVALID_ARG,
352-
"Invalid model path: contains invalid characters or not absolute");
353-
}
354-
355349
if (!IsValidIdentifier(shm_region_name_)) {
356350
return TRITONSERVER_ErrorNew(
357351
TRITONSERVER_ERROR_INVALID_ARG,

0 commit comments

Comments
 (0)