Fix packet password on exports, move __unserialize() to EncodeUTF8::decode
This commit is contained in:
@@ -314,20 +314,15 @@ class Packet extends FTNBase implements \Iterator, \Countable
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
// Cache the packet creation
|
||||
static $return = NULL;
|
||||
$return = $this->createHeader();
|
||||
|
||||
if (is_null($return)) {
|
||||
$return = $this->createHeader();
|
||||
|
||||
foreach ($this->messages as $o) {
|
||||
if ($o->packed)
|
||||
$return .= "\02\00".(string)$o;
|
||||
}
|
||||
|
||||
$return .= "\00\00";
|
||||
foreach ($this->messages as $o) {
|
||||
if ($o->packed)
|
||||
$return .= "\02\00".(string)$o;
|
||||
}
|
||||
|
||||
$return .= "\00\00";
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -337,7 +332,7 @@ class Packet extends FTNBase implements \Iterator, \Countable
|
||||
private function createHeader(): string
|
||||
{
|
||||
try {
|
||||
$a = pack(collect(self::v2header)->pluck(1)->join(''),
|
||||
$a = pack(collect(self::v2header)->merge(['password' => [0x1a,'a8',8]])->pluck(1)->join(''),
|
||||
$this->ff,
|
||||
$this->tf,
|
||||
Arr::get($this->header,'y'),
|
||||
|
Reference in New Issue
Block a user