WordPress.org

Ready to get started?Download WordPress

Forums

SSH SFTP Updater Support
support for FTP_PRIKEY is broken (0.2, patch) (1 post)

  1. lkraav
    Member
    Posted 2 years ago #

    This appears to be an oversight. SSUS worked fine when I tested initially by uploading private key, then stopped working when I switched to FTP_PRIKEY configuration.

    Reason is that in case of FTP_PRIKEY, $credentials['private_key'] is assigned the file path, not the contents. $rsa->loadKey needs the contents.

    Fix:

    sftp.php:
    ...
    50         // Check to see if we are setting the public/private keys for ssh
     51         $credentials['public_key'] = defined('FTP_PUBKEY') ? FTP_PUBKEY : (!empty($_POST['public_key']) ? stripslashes($_POST['public_key']) : '');
     52         if (defined('FTP_PRIKEY')) {
     53                 $credentials['private_key'] = file_get_contents(FTP_PRIKEY);
     54         } else {
    ...

    http://wordpress.org/extend/plugins/ssh-sftp-updater-support/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic