Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#29405 closed defect (bug) (fixed)

filesystem ssh2 move function parameter bug

Reported by: nobleclem's profile nobleclem Owned by: dd32's profile dd32
Milestone: 4.1 Priority: normal
Severity: normal Version: 2.8
Component: Filesystem API Keywords: has-patch commit 4.1-early
Focuses: Cc:


wp-admin/includes/class-wp-filesystem-ssh2.php line 256

The first parameter of ssh2_sftp_rename() is incorrect.
It is passing "$this->link" instead of the correct "$this->sftp_link" as the other ssh2_sftp_* calls are passing.

Attachments (1)

class-wp-filesystem-ssh2.patch (492 bytes) - added by nobleclem 9 years ago.

Download all attachments as: .zip

Change History (5)

#1 @nobleclem
9 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
9 years ago

  • Keywords commit 4.1-early added
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from 3.9.2 to 2.8

Appears to be missed in [8852] and [11063].

The first parameter passed to ssh2_sftp_rename() should be an SSH2 SFTP resource opened by ssh2_sftp(), which is $this->sftp_link, not $this->link. Looks good to me.

#3 @dd32
9 years ago

  • Milestone changed from Future Release to 4.1

#4 @dd32
9 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 29970:

Filesystem: Fix the move() method of the SSH2 transport, which was using the SSH2 link rather than the SFTP link.
Props nobleclem. Fixes #29405

Note: See TracTickets for help on using tickets.