-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Introduce whitelisted folders for external data validation #27352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
a06caea
0853aa8
4f70b56
0f9147c
04c8087
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -453,11 +453,6 @@ inline bool HasExternalDataInMemory(const ONNX_NAMESPACE::TensorProto& ten_proto | |||||||||||||||||
| return g_host->Utils__HasExternalDataInMemory(ten_proto); | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
|
||||||||||||||||||
| inline Status ValidateExternalDataPath(const PathString& model_path, | |
| const PathString& external_data_path, | |
| const std::vector<PathString>* allowed_paths, | |
| bool* is_whitelisted) { | |
| return g_host->Utils__ValidateExternalDataPath(model_path, external_data_path, allowed_paths, is_whitelisted); | |
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1004,9 +1004,6 @@ struct ProviderHost { | |||||||||||||||||
|
|
||||||||||||||||||
| virtual bool Utils__HasExternalDataInMemory(const ONNX_NAMESPACE::TensorProto& ten_proto) = 0; | ||||||||||||||||||
|
|
||||||||||||||||||
|
||||||||||||||||||
| // Validate that any external data referenced by the given TensorProto resides within the | |
| // provided whitelist of allowed locations. Implementations should return a non-OK Status | |
| // if any external data path is outside the whitelist. | |
| virtual Status Utils__ValidateExternalDataPath( | |
| const ONNX_NAMESPACE::TensorProto& tensor_proto, | |
| const std::vector<std::filesystem::path>& allowed_locations) = 0; |
Uh oh!
There was an error while loading. Please reload this page.