From c445d60a00f66c3c09e87de8f2264eae746f0be9 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 12 Jun 2015 06:31:28 +0000 Subject: [PATCH] SSH2 Upgrade transport: Use ssh2_sftp_realpath() instead of shell commands to determine the current directory on the remote server. This should allow it to be used on chrooted SSH sessions. See #32345 Built from https://develop.svn.wordpress.org/trunk@32726 git-svn-id: http://core.svn.wordpress.org/trunk@32696 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-filesystem-ssh2.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php index b8b541ed25..e446656ec1 100644 --- a/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -193,7 +193,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { * @return bool */ public function cwd() { - $cwd = $this->run_command('pwd'); + $cwd = ssh2_sftp_realpath( $this->sftp_link, '.' ); if ( $cwd ) { $cwd = trailingslashit( trim( $cwd ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index c30282b67d..a0f8da3c09 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32725'; +$wp_version = '4.3-alpha-32726'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.