Make WordPress Core

Ticket #33196: x.2

File x.2, 1.0 KB (added by ehsanakhgari, 9 years ago)

Patch (v2)

Line 
1commit cdba9480f04bb360fee6149de205e838618bc23c (HEAD, 33196)
2Author: Ehsan Akhgari <ehsan@mozilla.com>
3Date:   Thu Jul 30 00:57:38 2015 -0400
4
5    Fix for issue 33196
6
7diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php
8index e446656..724ec23 100644
9--- a/wp-admin/includes/class-wp-filesystem-ssh2.php
10+++ b/wp-admin/includes/class-wp-filesystem-ssh2.php
11@@ -81,16 +81,17 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
12                        $this->keys = true;
13                } elseif ( empty ($opt['username']) ) {
14                        $this->errors->add('empty_username', __('SSH2 username is required'));
15                }
16 
17                if ( !empty($opt['username']) )
18                        $this->options['username'] = $opt['username'];
19 
20+               $this->options['password'] = $opt['password'];
21                if ( empty ($opt['password']) ) {
22                        // Password can be blank if we are using keys.
23                        if ( !$this->keys )
24                                $this->errors->add('empty_password', __('SSH2 password is required'));
25                } else {
26                        $this->options['password'] = $opt['password'];
27                }
28        }