Skip to content

fixed Bug #68621 #1159

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

Closed
wants to merge 6 commits into from
Closed

fixed Bug #68621 #1159

wants to merge 6 commits into from

Conversation

Neeke
Copy link

@Neeke Neeke commented Mar 7, 2015

The ZipArchive::open treats the filename not as defined per php manual on valid file wrappers. It appends the filename to the base url. Hence, creating/manipulating a zip file in memory space would be impossible.

https://bugs.php.net/bug.php?id=68621

@laruence laruence mentioned this pull request Mar 7, 2015
@ghost
Copy link

ghost commented Mar 7, 2015

Can one of the admins verify this patch?

if (!(resolved_path = expand_filepath(filename->val, NULL))) {
RETURN_FALSE;
}
if (!strspn(filename->val,php_spn)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be only partial fix. What about any other streams? If we want to support streams here, it should support all streams, not only one specific stream.

@smalyshev smalyshev added the Bug label Mar 9, 2015
@smalyshev
Copy link
Contributor

Also, this patch seems to cause serious breakage in the tests, please look into it.

Neeke added 2 commits March 9, 2015 10:09
Conflicts:
	ext/zip/php_zip.c
	ext/zip/tests/bug68621.phpt
@Neeke
Copy link
Author

Neeke commented Mar 9, 2015

The test case already revised, no problem now.

@Neeke
Copy link
Author

Neeke commented Mar 9, 2015

This fix will return:

php_error_docref(NULL, E_WARNING, "Cannot destroy the zip context");

@Neeke Neeke closed this Mar 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants