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

Ensure Windows-compliant filenames #1361

Closed
wants to merge 2 commits into from
Closed

Ensure Windows-compliant filenames #1361

wants to merge 2 commits into from

Conversation

OleVik
Copy link
Contributor

@OleVik OleVik commented Mar 19, 2017

Adds an array ($illegal) of disallowed characters, and does a simple str_replace on filename prior to writing the package to /tmp, in InstallCommand->downloadPackage(). Source: SO and MSDN, tested on Windows 10 x64, PHP v7.0.7 ran via Caddy v0.9.3.

Other considerations could be added to $illegal, but at current they are superfluous. Did not instantiate as a Class-property as only downloadPackage() runs file_put_contents.

Adds an array of disallowed ($illegal) characters, and does a simple str_replace on filename prior to writing the package, in InstallCommand->downloadPackage().
Because PCRE is a single line, and virtually faster.
@rhukster
Copy link
Member

@OleVik I see this fix is only in the GPM CLI command, is this not an issue when installing/updating on windows via admin?

@rhukster
Copy link
Member

I found it.. updated myself, going to test...

@OleVik
Copy link
Contributor Author

OleVik commented Mar 20, 2017

Good point, hadn't tested from Admin.

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