-
Notifications
You must be signed in to change notification settings - Fork 7
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
Patch in CCustomScript::ResolvePath for ModLoader support. #184
Conversation
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.
please delete commented code
This is that check for safe paths. This should be implemented in correct way instead of just disabling. |
are you going to update it in this PR? |
cleo_sdk/CLEO_Utils.h
Outdated
// does file path points inside game directories? (game root or user files) | ||
static bool IsFilepathSafe(CLEO::CRunningScript* thread, const char* path) | ||
{ | ||
// TODO: path handling should use more advanced utils from std::filesystem |
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.
maybe call canonical first, then check if the path starts with root/userfiles ?
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.
Yes, but this will need including std::filesystem. I'm not sure if this header should create that dependency.
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.
can you move it to a separate header file then?
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.
updated
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.
OK, I'm not familiar with filesystem APIs in C++, so I'm going to trust you that this is working as intended.
e09a9b2
to
6bbaff4
Compare
Still what with Skin Loader killing other scripts? |
This is what it also does in CLEO4, so users should already suffer from it. We can discuss potential mitigation, but it's not our primary concern right now. |
No description provided.