summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_certmanager.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-05-14 12:39:56 -0400
committerjim-p <jimp@pfsense.org>2012-05-14 12:39:56 -0400
commit547c56c4fb6504af27c087d49cec6662b94bea3d (patch)
treef8152751a9fb16bba7d94df861582e37ec6832d0 /usr/local/www/system_certmanager.php
parente052047dd8145b336755206b728e61f28d7a544b (diff)
downloadpfsense-547c56c4fb6504af27c087d49cec6662b94bea3d.zip
pfsense-547c56c4fb6504af27c087d49cec6662b94bea3d.tar.gz
Create $altnames earlier, and also fix a bracing issue with this if statement. Fixes certificate importing.
Diffstat (limited to 'usr/local/www/system_certmanager.php')
-rw-r--r--usr/local/www/system_certmanager.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php
index aa01209..6622b40 100644
--- a/usr/local/www/system_certmanager.php
+++ b/usr/local/www/system_certmanager.php
@@ -234,10 +234,10 @@ if ($_POST) {
$reqdfieldsn = array(gettext("Existing Certificate Choice"));
}
+ $altnames = array();
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
- if ($pconfig['method'] != "import")
+ if ($pconfig['method'] != "import") {
/* subjectAltNames */
- $altnames = array();
foreach ($_POST as $key => $value) {
$entry = '';
if (!substr_compare('altname_type', $key, 0, 12)) {
@@ -292,6 +292,7 @@ if ($_POST) {
}else if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST["$reqdfields[$i]"]))
array_push($input_errors, "The field '" . $reqdfieldsn[$i] . "' contains invalid characters.");
}
+ }
/* if this is an AJAX caller then handle via JSON */
if (isAjax() && is_array($input_errors)) {
OpenPOWER on IntegriCloud