[wp-trac] [WordPress Trac] #58541: WP_Filesystem_SSH2:put_contents (and others) does not check for $sftp_link to be up

WordPress Trac noreply at wordpress.org
Tue Jun 20 05:37:15 UTC 2023


#58541: WP_Filesystem_SSH2:put_contents (and others) does not check for $sftp_link
to be up
--------------------------------------+-----------------------------
 Reporter:  jobst                     |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Future Release
Component:  Filesystem API            |     Version:
 Severity:  major                     |  Resolution:
 Keywords:  needs-patch dev-feedback  |     Focuses:
--------------------------------------+-----------------------------

Comment (by jobst):

 With the patch provided the same debug printout of '$wp_filesystem' (as in
 comment #7) now looks as follows with no errors and a non null resource
 link
 {{{
 [20-Jun-2023 05:33:01 UTC] =============================================
 this is JUST after WP_Filesystem_SSH2 Object
 (
     [link] => Resource id #1529
     [sftp_link] => Resource id #1530
     [keys] => 1
     [verbose] =>
     [cache] => Array
         (
         )

     [method] => ssh2
     [errors] => WP_Error Object
         (
             [errors] => Array
                 (
                 )

             [error_data] => Array
                 (
                 )

             [additional_data:protected] => Array
                 (
                 )

         )

     [options] => Array
         (
             [port] => 22
             [hostname] => 127.0.0.1
             [username] => REDACTED
             [public_key] => REDACTED
             [private_key] => REDACTED
             [hostkey] => Array
                 (
                     [hostkey] => ssh-rsa,ssh-ed25519
                 )

         )

 )
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58541#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list