6.0.0-beta6
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
4/10/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#8669] ssh2 VFS module stat() cache needs to be flushed in read() before checking file size
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ . .. .._..__. [__)| || | | | | | |__||/\|_|_|__\
Comment
> The remote file is able to be successfully retrieved by the ssh2 VFS > module and stored in a local temp file. However, the "$size = > filesize($file);" line in the read() function returns the size of the > local temp file as 0 which in turn results in no file content being > returned. > > > > This is caused by calling certain other PHP function(s) (which rely > on the underlying OS stat() function) on the temp file prior to it > actually being populated with remote content. The details of the > first stat() on the temp file are cached in the PHP stat cache, so > even though the temp file subsequently gets populated with content, > the cache returns data for the temp file which is stale. > > > > On a more general note, this type of bug seems like it may be > relevant to any filesystem-based VFS modules, so it may be wise to > audit the use of the functions listed here in the "Affected > functions" list: > > http://us2.php.net/manual/en/function.clearstatcache.php > > and check if calls to clearstatcache() are required in other places > within Horde as well.
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers