-
Notifications
You must be signed in to change notification settings - Fork 824
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
Replace Path
class with Symfony Path
class
#11340
Comments
I don't think this is worthwhile as the Silverstripe Silverstripe Path::join() includes protection against directly traversal i.e. not allowed The Silverstripe normalize() method also has an additional param $relative which means that the directory seperators will be rtrim()'ed off If you agree with this assessment then just close this issue |
I honestly think the way symfony does that is better. Directory traversal protection doesn't belong in a "join these two paths together" method, it belongs in whatever is using that path - at which point you'd know where you are or aren't allowed to traverse to.
I think it's worth losing that little bit of functionality and having a few
And yes technically we can use the other Path class along side our one, but that just makes point 1 worse imo. |
I'd go with Symphony's Path class, too, so that we don't have the same conversation in a year why we didn't replace this component when we replaced others. |
#11380 (review) |
Path could be possibly be replaced with the Path class in symfony/filesystem
Notes
Acceptance criteria
Path
class is worthwhile and viablePath
CMS 5 PRs
CMS 6 PRs
Do not merge yet - after CMS 5 PR is merged, reassign to Guy to rebase.
The text was updated successfully, but these errors were encountered: