增加证书解析健壮性

This commit is contained in:
yansongda 2021-08-06 18:40:38 +08:00
parent e74bd60c6b
commit 2a0773b488
2 changed files with 5 additions and 2 deletions

View File

@ -121,7 +121,7 @@ class PreparePlugin implements PluginInterface
$exploded = explode('-----END CERTIFICATE-----', file_get_contents($path));
foreach ($exploded as $cert) {
if (empty($cert)) {
if (empty(trim($cert))) {
continue;
}

View File

@ -85,4 +85,7 @@ UugDo9u8igJORYA+5ms0s5sCUySqbQ2R5z/GoceyI9LdxIVa1RjVX8pYOj8JFwtn
DJN3ftSFvNMYwRuILKuqUYSHc2GPYiHVflDh5nDymCMOQFcFG3WsEuB+EYQPFgIU
1DHmdZcz7Llx8UOZXX2JupWCYzK1XhJb+r4hK5ncf/w8qGtYlmyJpxk3hr1TfUJX
Yf4Zr0fJsGuv
-----END CERTIFICATE-----
-----END CERTIFICATE-----