[BUG] GPG encrypted data gets corrupted
Posted: Thu Aug 09, 2007 6:17 am
I have found that the function encode8Bit (and others I guess) in Encoder.php (line 315) messes an ordinary GPG encrypted text so it becomes unreadable by the recipient.
I have noticed that on such data, the wordwrap function should not be used after the fixLE function. Si I have changed th function to:
But there must be a better way to handle the situation...
All the best, end thanks for such a great work !
I have noticed that on such data, the wordwrap function should not be used after the fixLE function. Si I have changed th function to:
Code: Select all
public function encode8Bit($data, $chunk=76, $le="\r\n")
{
if(strpos($data, "-----BEGIN PGP MESSAGE-----") === 0)
return $this->fixLE($data,$le);
else
return $this->fixLE(wordwrap($data, $chunk-2, $le, 1), $le);
}All the best, end thanks for such a great work !