From 5b795c18ab91f7809a0d6501a6feafbe5aa9921e Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sun, 27 Jan 2019 17:03:53 -0600 Subject: [PATCH] SCP: issue error if remote_file is empty in put() call --- phpseclib/Net/SCP.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpseclib/Net/SCP.php b/phpseclib/Net/SCP.php index 354acea1..9e48c479 100644 --- a/phpseclib/Net/SCP.php +++ b/phpseclib/Net/SCP.php @@ -180,6 +180,11 @@ class Net_SCP return false; } + if (empty($remote_file)) { + user_error('remote_file cannot be blank', E_USER_NOTICE); + return false; + } + if (!$this->ssh->exec('scp -t ' . escapeshellarg($remote_file), false)) { // -t = to return false; }