[wp-trac] [WordPress Trac] #25237: WP_Filesystem fails to verify files were written to disk correctly
WordPress Trac
noreply at wordpress.org
Fri Sep 6 05:01:16 UTC 2013
#25237: WP_Filesystem fails to verify files were written to disk correctly
--------------------------------------------+------------------
Reporter: dd32 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.7
Component: Filesystem | Version: 2.5
Severity: normal | Resolution:
Keywords: has-patch needs-testing commit |
--------------------------------------------+------------------
Changes (by dd32):
* keywords: => has-patch needs-testing commit
Comment:
> Attachment attachment:25237.diff added
Committable patch, just attaching here for review for now until proper
testing is done.
All - The return results of fwrite()'s were not being checked, as a
result, it was possible for it to read/write half a file and return that
as a successful read/write. This results in partially written files.
FTP Sockets - Forcing all writes and reads to `FTP_BINARY`, the FTP class
in use will auto-convert line endings to \n or \r\n on linux/windows
servers, this will cause file verification failures in future.
FTP / SSH - These supported 2 extra args which the Direct class don't,
`$type` (ASCII or BINARY), and `$resumepos` (which wasn't always
respected). Neither were respected by SSH2. These are removed in the
patch since Direct doesn't support them, and they haven't been able to be
relied upon. Any plugin using the `$resumepos` parameter would have only
worked with the FTP Extension, and the `$type` variable removal will not
negatively affect any plugin at all.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25237#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list