php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64306 sometimes rmdir() doesn't really remove folder if WinCache extension enabled
Submitted: 2013-02-27 05:36 UTC Modified: 2013-11-20 22:20 UTC
From: pvasilevich at parallels dot com Assigned: ericsten (profile)
Status: Closed Package: WinCache (PECL)
PHP Version: 5.4.12 OS: Windows 2008R2
Private report: No CVE-ID: None
 [2013-02-27 05:36 UTC] pvasilevich at parallels dot com
Description:
------------
rmdir() function is intercepted by WinCache extension and replaced by its own implementation. Before original rmdir() is called, wincache tries to lookup directory passed to rmdir() in filecache (aplist_fcache_get function) and if this lookup is failed by some reasons, then original function is not even called. And directory is not removed in fact.

After enabling debug in php.ini and some experiments I've detected that aplist_fcache_get can return FATAL_OUT_OF_SMEMORY error. If this happened, directory is not removed.

I think this is not valid behavior, and original handler should be called, if specified location cannot be found in file cache.

I have applied patch that returns error after original handler is called.



Patches

rmdir_fix (last revision 2013-02-27 05:38 UTC) by pvasilevich at parallels dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-20 22:20 UTC] ericsten@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: ericsten
 [2013-11-20 22:20 UTC] ericsten@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

fixed in SVN revision 332173
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sat Nov 17 00:01:26 2018 UTC