diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index c4970d49..66001f18 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -3730,18 +3730,18 @@ class SSH2 $cmf = ord($payload[0]); $cm = $cmf & 0x0F; if ($cm != 8) { // deflate - user_error("Only CM = 8 ('deflate') is supported ($cm)"); + throw new \RuntimeException("Only CM = 8 ('deflate') is supported ($cm)"); } $cinfo = ($cmf & 0xF0) >> 4; if ($cinfo > 7) { - user_error("CINFO above 7 is not allowed ($cinfo)"); + throw new \RuntimeException("CINFO above 7 is not allowed ($cinfo)"); } $windowSize = 1 << ($cinfo + 8); $flg = ord($payload[1]); //$fcheck = $flg && 0x0F; if ((($cmf << 8) | $flg) % 31) { - user_error('fcheck failed'); + throw new \RuntimeException('fcheck failed'); } $fdict = boolval($flg & 0x20); $flevel = ($flg & 0xC0) >> 6;