From: Michael M Slusarz Date: Wed, 19 Nov 2008 03:54:27 +0000 (-0700) Subject: Make sure all EOL chars have been stripped. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e2bd851a6cde59270a68c666577798d85b77fbdd;p=horde.git Make sure all EOL chars have been stripped. --- diff --git a/framework/Crypt/lib/Horde/Crypt/pgp.php b/framework/Crypt/lib/Horde/Crypt/pgp.php index 76604d323..a43d2f21d 100644 --- a/framework/Crypt/lib/Horde/Crypt/pgp.php +++ b/framework/Crypt/lib/Horde/Crypt/pgp.php @@ -676,7 +676,8 @@ class Horde_Crypt_pgp extends Horde_Crypt * 'type' - (integer) The type of data contained in block. * Valid types are defined at the top of this class * (the ARMOR_* constants). - * 'data' - (array) The data for each section. + * 'data' - (array) The data for each section. Each line has been stripped + * of EOL characters. * */ public function parsePGPData($text) @@ -688,6 +689,7 @@ class Horde_Crypt_pgp extends Horde_Crypt $buffer = explode("\n", $text); while (list(,$val) = each($buffer)) { + $val = rtrim($val, "\r"); if (preg_match('/^-----(BEGIN|END) PGP ([^-]+)-----\s*$/', $val, $matches)) { if (isset($temp_array['data'])) { $data[] = $temp_array;