summaryrefslogtreecommitdiffstats
path: root/etc/inc/certs.inc
diff options
context:
space:
mode:
authorjim-p <jim@pingle.org>2010-09-16 23:37:22 -0400
committerjim-p <jim@pingle.org>2010-09-16 23:37:46 -0400
commite4d7a06478f0c023a87fadc6f1c0fed388015626 (patch)
tree5781e539895115c1fb6c1c9dcff17f1b8e5b7883 /etc/inc/certs.inc
parent86dcdfc9af338c8f76de0d6863ed058c4be74665 (diff)
downloadpfsense-e4d7a06478f0c023a87fadc6f1c0fed388015626.zip
pfsense-e4d7a06478f0c023a87fadc6f1c0fed388015626.tar.gz
Prevent a foreach on what might not be an array. Fixes #900
Diffstat (limited to 'etc/inc/certs.inc')
-rw-r--r--etc/inc/certs.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/inc/certs.inc b/etc/inc/certs.inc
index 08c9879..3308565 100644
--- a/etc/inc/certs.inc
+++ b/etc/inc/certs.inc
@@ -321,6 +321,10 @@ function cert_get_subject_array($crt) {
$str_crt = base64_decode($crt);
$inf_crt = openssl_x509_parse($str_crt);
$components = $inf_crt['subject'];
+
+ if (!is_array($components))
+ return;
+
$subject_array = array();
foreach($components as $a => $v)
OpenPOWER on IntegriCloud