mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-23 23:28:32 +00:00
X509: really looong base64 encoded strings broke extractBER()
This commit is contained in:
parent
d8e39b0864
commit
d077c7b296
@ -5144,7 +5144,9 @@ class File_X509
|
||||
* subject=/O=organization/OU=org unit/CN=common name
|
||||
* issuer=/O=organization/CN=common name
|
||||
*/
|
||||
$temp = preg_replace('#.*?^-+[^-]+-+[\r\n ]*$#ms', '', $str, 1);
|
||||
$temp = strlen($str) <= ini_get('pcre.backtrack_limit') ?
|
||||
preg_replace('#.*?^-+[^-]+-+[\r\n ]*$#ms', '', $str, 1) :
|
||||
$str;
|
||||
// remove the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- stuff
|
||||
$temp = preg_replace('#-+[^-]+-+#', '', $temp);
|
||||
// remove new lines
|
||||
|
Loading…
x
Reference in New Issue
Block a user