You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've read the readPacket private function and found the implementation way to naive to be used in production systems.
When $packet = fread($this->_sock, self::HEADER_LEN) is called on line 382 the returned value is considered to be either false or a 8 byte string. In reality this string can have any length up to 8 bytes.
This problem does not occur when reading the content, because reading won't stop until $resp['contentLength'] bytes are read, but the fread($this->_sock, $resp['paddingLength']) call suffers from the same problem.
The text was updated successfully, but these errors were encountered:
I've read the readPacket private function and found the implementation way to naive to be used in production systems.
When
$packet = fread($this->_sock, self::HEADER_LEN)
is called on line 382 the returned value is considered to be either false or a 8 byte string. In reality this string can have any length up to 8 bytes.This problem does not occur when reading the content, because reading won't stop until
$resp['contentLength']
bytes are read, but thefread($this->_sock, $resp['paddingLength'])
call suffers from the same problem.The text was updated successfully, but these errors were encountered: