Another fix for when packets contain binary messages with SOH chars.
This commit is contained in:
@@ -692,9 +692,16 @@ class Message extends FTNBase
|
||||
|
||||
// If there are is a return in this middle of this line, that means the text message starts after the return
|
||||
// If our message has started, then we'll assume the binary is part of the message.
|
||||
if (strlen($this->message) || ($retpos != strlen($kl)-1)) {
|
||||
if (strlen($this->message) || ($retpos !== strlen($kl)-1)) {
|
||||
|
||||
// If there was no return, its part of the message.
|
||||
if ($retpos === FALSE) {
|
||||
$this->message .= "\x01".$kl;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Anything after the origin line is also kludge data.
|
||||
if (($originpos = strpos($kl,"\r * Origin: "))) {
|
||||
if ($originpos = strpos($kl,"\r * Origin: ")) {
|
||||
if (! $this->message) {
|
||||
$this->message .= substr($kl,$retpos+1,$originpos-$retpos-1);
|
||||
$this->parseOrigin(substr($kl,$originpos+1));
|
||||
|
Reference in New Issue
Block a user