diff options
author | jim-p <jim@pingle.org> | 2010-09-16 23:37:22 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2010-09-16 23:37:46 -0400 |
commit | e4d7a06478f0c023a87fadc6f1c0fed388015626 (patch) | |
tree | 5781e539895115c1fb6c1c9dcff17f1b8e5b7883 /etc | |
parent | 86dcdfc9af338c8f76de0d6863ed058c4be74665 (diff) | |
download | pfsense-e4d7a06478f0c023a87fadc6f1c0fed388015626.zip pfsense-e4d7a06478f0c023a87fadc6f1c0fed388015626.tar.gz |
Prevent a foreach on what might not be an array. Fixes #900
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/certs.inc | 4 |
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) |