Skip to content

Commit

Permalink
[mms] More efficient parsing in Horde_Crypt_Pgp_Parse.
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jan 24, 2014
1 parent e14889f commit c2ca7ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion framework/Crypt/lib/Horde/Crypt/Pgp/Parse.php
Expand Up @@ -107,7 +107,8 @@ public function parse($text)

while (!$stream->eof()) {
$val = rtrim($stream->getToChar("\n", false), "\r");
if (preg_match('/^-----(BEGIN|END) PGP ([^-]+)-----\s*$/', $val, $matches)) {
if ((strpos($val, '-----') === 0) &&
preg_match('/^-----(BEGIN|END) PGP ([^-]+)-----\s*$/', $val, $matches)) {
if (isset($temp['data'])) {
$data[] = $temp;
}
Expand Down
4 changes: 2 additions & 2 deletions framework/Crypt/package.xml
Expand Up @@ -27,7 +27,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [mms] More efficient parsing in Horde_Crypt_Pgp_Parse.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -990,7 +990,7 @@ Initial release as a PEAR package
<date>2013-11-19</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [mms] More efficient parsing in Horde_Crypt_Pgp_Parse.
</notes>
</release>
</changelog>
Expand Down

0 comments on commit c2ca7ae

Please sign in to comment.