Skip to content

Phar extraction: add warning about following symlinks - #5864

Open
DanielEScherzer wants to merge 1 commit into
php:masterfrom
DanielEScherzer:phar-extract
Open

DanielEScherzer wants to merge 1 commit into
php:masterfrom
DanielEScherzer:phar-extract

Conversation

@DanielEScherzer

Copy link
Copy Markdown
Member

Add a warning to both Phar::extractTo() and PharData::extractTo() about the fact that symlinks in the target directory are followed.

Add a warning to both `Phar::extractTo()` and `PharData::extractTo()` about the
fact that symlinks in the target directory are followed.
<parameter>directory</parameter>. If there is a symlink to some other
directory, files may be extracted outside of the desired location; if
there is a symlink to a file, the target of the symlink will be
overwritten when <parameter>overwrite</parameter> is true.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
overwritten when <parameter>overwrite</parameter> is true.
overwritten when <parameter>overwrite</parameter> is true, or created
if it does not exist, whatever the value of <parameter>overwrite</parameter>.

<parameter>directory</parameter>. If there is a symlink to some other
directory, files may be extracted outside of the desired location; if
there is a symlink to a file, the target of the symlink will be
overwritten when <parameter>overwrite</parameter> is true.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
overwritten when <parameter>overwrite</parameter> is true.
overwritten when <parameter>overwrite</parameter> is true, or created
if it does not exist, whatever the value of <parameter>overwrite</parameter>.

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