1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-12 00:59:48 +01:00

X509: extra characters before cert weren't being removed

This commit is contained in:
terrafrost 2021-05-23 10:38:11 -05:00
parent 915d1d8ca9
commit 0a2dc24489

View File

@ -5148,7 +5148,7 @@ class File_X509
$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);