Skip to content

Commit

Permalink
Revert "Another additional tweak to PGP parsing"
Browse files Browse the repository at this point in the history
This reverts commit 5574680.

We always need the line to be stripped of newline characters
  • Loading branch information
slusarz committed Jan 28, 2014
1 parent e17cd55 commit ce51950
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions framework/Crypt/lib/Horde/Crypt/Pgp/Parse.php
Expand Up @@ -106,9 +106,8 @@ public function parse($text)
}

while (!$stream->eof()) {
$val = $stream->getToChar("\n", false);
$val = rtrim($stream->getToChar("\n", false), "\r");
if ((strpos($val, '-----') === 0) &&
($val = rtrim($val, "\r")) &&
preg_match('/^-----(BEGIN|END) PGP ([^-]+)-----\s*$/', $val, $matches)) {
if (isset($temp['data'])) {
$data[] = $temp;
Expand Down

0 comments on commit ce51950

Please sign in to comment.