fix for issue 6076. avoid GlobIterator globbing to directories which it ... #6077

Merged
merged 4 commits into from Apr 14, 2014

Conversation

Projects
None yet
4 participants
@brettmc
Contributor

brettmc commented Apr 2, 2014

...will subsequently fail to unlink() by appending . instead of just * to path in clearByNamespace() and clearByPrefix(). . will glob to both .dat and .tag extensions

fix for issue 6076. avoid GlobIterator globbing to directories which …
…it will subsequently fail to unlink() by appending *.* instead of just * to path in clearByNamespace() and clearByPrefix(). *.* will glob to both .dat and .tag extensions

@Ocramius Ocramius added bug labels Apr 2, 2014

@Ocramius

This comment has been minimized.

Show comment
Hide comment
@Ocramius

Ocramius Apr 2, 2014

Member

@brettmc can you provide a test for this one?

Member

Ocramius commented Apr 2, 2014

@brettmc can you provide a test for this one?

@Ocramius Ocramius added Cache and removed Stdlib labels Apr 2, 2014

@Ocramius

This comment has been minimized.

Show comment
Hide comment
Member

Ocramius commented Apr 2, 2014

See #6076

add unit test for clearByNamespace. Attempting to write a unit test f…
…or clearByPrefix shows that it's actually not an issue (due to the prefix itself differentiating a file from a dir), so revert my change to clearByPrefix
@marc-mabe

This comment has been minimized.

Show comment
Hide comment
@marc-mabe

marc-mabe Apr 4, 2014

Member

As noted in #6076 it should be done for clearByPrefix(), too

Member

marc-mabe commented Apr 4, 2014

As noted in #6076 it should be done for clearByPrefix(), too

brettmc added some commits Apr 7, 2014

add fix and unit test for the case where Filesystem::clearByPrefix() …
…can try to remove a directory (eg if the prefix happens to collide with a partial md5 key), as pointed out by @marc-mabe in issue 6076

@weierophinney weierophinney added this to the 2.3.1 milestone Apr 14, 2014

@weierophinney weierophinney self-assigned this Apr 14, 2014

weierophinney added a commit that referenced this pull request Apr 14, 2014

Merge pull request #6077 from brettmc/zf6076
fix for issue 6076. avoid GlobIterator globbing to directories which it ...

Conflicts:
	tests/ZendTest/Cache/Storage/Adapter/FilesystemTest.php

weierophinney added a commit that referenced this pull request Apr 14, 2014

@weierophinney weierophinney merged commit 9651573 into zendframework:master Apr 14, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

weierophinney added a commit that referenced this pull request Apr 14, 2014

@brettmc brettmc deleted the brettmc:zf6076 branch Apr 15, 2014

weierophinney added a commit to zendframework/zend-cache that referenced this pull request May 15, 2015

Merge pull request zendframework/zendframework#6077 from brettmc/zf6076
fix for issue 6076. avoid GlobIterator globbing to directories which it ...

Conflicts:
	tests/ZendTest/Cache/Storage/Adapter/FilesystemTest.php

weierophinney added a commit to zendframework/zend-cache that referenced this pull request May 15, 2015

weierophinney added a commit to zendframework/zend-cache that referenced this pull request May 15, 2015

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