From 0a2dc24489f9a05efb1094502429b6de416545b8 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sun, 23 May 2021 10:38:11 -0500 Subject: [PATCH] X509: extra characters before cert weren't being removed --- phpseclib/File/X509.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 07fd911d..428e677f 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -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);