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

Helper::purge() protection [WIP] #392

Merged
merged 1 commit into from
Feb 20, 2019
Merged

Helper::purge() protection [WIP] #392

merged 1 commit into from
Feb 20, 2019

Conversation

dg
Copy link
Member

@dg dg commented Oct 24, 2018

  • new feature?
  • BC break? no
  1. Prevents an incorrect call with an empty parameter (eg due to a typo in the code), which can lead to the whole disc being deleted

  2. Disables purge('/') or `purge('c:/') just for sure

@milo
Copy link
Member

milo commented Oct 29, 2018

Hope you didn't discover that on your own PC.

Not sure there should be a test for it :)

@milo
Copy link
Member

milo commented Oct 29, 2018

Maybe run this check after realpath(dirname($dir)) to prevent . or .. misusing too.

@dg dg merged commit bcdd42a into nette:master Feb 20, 2019
@dg dg deleted the pull-purge branch February 20, 2019 01:45
dg added a commit that referenced this pull request Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants