Skip to content
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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Conversation

samerton
Copy link
Member

@samerton samerton commented Oct 1, 2023

No description provided.

@samerton samerton added this to the 2.2.0 milestone Oct 1, 2023
partydragen
partydragen previously approved these changes Mar 9, 2024
@samerton samerton marked this pull request as ready for review April 28, 2024 11:53
!str_contains($directory, 'custom') ||
!str_contains($directory, 'modules') ||
!str_contains($directory, 'uploads')
) {
Copy link
Member

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?

Copy link
Member

@Derkades Derkades Apr 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants