mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 02:07:09 +00:00
Merge branch '1.0' into 2.0
* 1.0: SSH2: limit the size of data that expect() looks at Conflicts: phpseclib/Net/SSH2.php
This commit is contained in:
commit
6cbe537ba6
@ -2587,7 +2587,7 @@ class SSH2
|
|||||||
$match = $expect;
|
$match = $expect;
|
||||||
while (true) {
|
while (true) {
|
||||||
if ($mode == self::READ_REGEX) {
|
if ($mode == self::READ_REGEX) {
|
||||||
preg_match($expect, $this->interactiveBuffer, $matches);
|
preg_match($expect, substr($this->interactiveBuffer, -1024), $matches);
|
||||||
$match = isset($matches[0]) ? $matches[0] : '';
|
$match = isset($matches[0]) ? $matches[0] : '';
|
||||||
}
|
}
|
||||||
$pos = strlen($match) ? strpos($this->interactiveBuffer, $match) : false;
|
$pos = strlen($match) ? strpos($this->interactiveBuffer, $match) : false;
|
||||||
|
Loading…
Reference in New Issue
Block a user