From 034ec72ade71bd8148012b8f9cb0da6721d25aa7 Mon Sep 17 00:00:00 2001 From: Jim Wigginton Date: Thu, 6 Oct 2011 12:12:56 +0000 Subject: [PATCH] - if a binary packet can't be decrypt don't bother to process it further git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@180 21d32557-59b3-4da0-833f-c5933fad653e --- phpseclib/Net/SSH2.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 25f6a2c8..ffa50630 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1881,6 +1881,10 @@ class Net_SSH2 { if ($this->decrypt !== false) { $raw = $this->decrypt->decrypt($raw); } + if ($raw === false) { + user_error('Unable to decrypt content', E_USER_NOTICE); + return false; + } extract(unpack('Npacket_length/Cpadding_length', $this->_string_shift($raw, 5)));