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
Add uninstall option to modules #3449
base: develop
Are you sure you want to change the base?
Conversation
!str_contains($directory, 'custom') || | ||
!str_contains($directory, 'modules') || | ||
!str_contains($directory, 'uploads') | ||
) { |
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.
This does not look right. Won’t this always return false unless the string contains custom, modules AND uploads?
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.
Looks fine to me. It aborts if:
- The path contains "Core" (to prevent deleting modules/Core)
- OR the path does not contain "custom"
- OR the path does not contain "modules"
- OR the path does not contain "uploads"
A resolved absolute path check would be better. Although this is not a security feature so it doesn't matter if it can be bypassed.
No description provided.