Skip to content

Commit

Permalink
X509: extra characters before cert weren't being removed
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed May 23, 2021
1 parent 915d1d8 commit 0a2dc24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phpseclib/File/X509.php
Expand Up @@ -5148,7 +5148,7 @@ function _extractBER($str)
$temp = $str;
} else {
$temp = preg_replace('#.*?^-+[^-]+-+[\r\n ]*$#ms', '', $str, 1);
$temp = preg_replace('#-+END.*[\r\n ]*.*#ms', '', $str, 1);
$temp = preg_replace('#-+END.*[\r\n ]*.*#ms', '', $temp, 1);
}
// remove new lines
$temp = str_replace(array("\r", "\n", ' '), '', $temp);
Expand Down

1 comment on commit 0a2dc24

@terrafrost
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #1659

Please sign in to comment.