-
Notifications
You must be signed in to change notification settings - Fork 237
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
[Release] Add symlink verification before opening file #3097
[Release] Add symlink verification before opening file #3097
Conversation
@@ -71,6 +72,7 @@ def load_from_dir(dir_path: str) -> Tuple[Dict[str, Any], Dict[str, str]]: | |||
continue # Skip the metadata file | |||
|
|||
try: | |||
fail_if_symlink(statistics_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a specific function, such as safe_open,
and use it here and below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a missed symlink check instead of the method since this is just a hotfix. A proper solution should be provided as part of the statistics caching implementation change (from pickle).
This reverts commit c3f84de.
…it#3097) ### Changes - As stated in the title. ### Reason for changes - Fix after openvinotoolkit#3017. ### Related tickets - 157068 ### Tests - test_examples/620/ - passed (cherry picked from commit 7510b4f)
Changes
Reason for changes
Related tickets
Tests