summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-06-12 13:26:23 -0400
committerjim-p <jimp@pfsense.org>2013-06-12 13:38:58 -0400
commit82b7f50a1c87739b08414f20b69dd1853f5ce495 (patch)
treec84e944c84f7fd5b7b44e137b5235c34acc9355d
parentf57e41814655f13cc34a1089d87630b68a4cccf3 (diff)
downloadpfsense-82b7f50a1c87739b08414f20b69dd1853f5ce495.zip
pfsense-82b7f50a1c87739b08414f20b69dd1853f5ce495.tar.gz
Don't restrict the content of descr when making CA/Certs, it's free-form.
-rw-r--r--usr/local/www/system_camanager.php2
-rw-r--r--usr/local/www/system_certmanager.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/system_camanager.php b/usr/local/www/system_camanager.php
index 4d0c961..3abc843 100644
--- a/usr/local/www/system_camanager.php
+++ b/usr/local/www/system_camanager.php
@@ -211,7 +211,7 @@ if ($_POST) {
}else if ($reqdfields[$i] == 'dn_commonname'){
if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST["dn_commonname"]))
array_push($input_errors, "The field 'Distinguished name Common Name' contains invalid characters.");
- }else if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST["$reqdfields[$i]"]))
+ }else if (($reqdfields[$i] != "descr") && preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST["$reqdfields[$i]"]))
array_push($input_errors, "The field '" . $reqdfieldsn[$i] . "' contains invalid characters.");
}
diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php
index 312aa52..95d604a 100644
--- a/usr/local/www/system_certmanager.php
+++ b/usr/local/www/system_certmanager.php
@@ -242,7 +242,7 @@ if ($_POST) {
}else if (preg_match('/commonname/', $reqdfields[$i])){ /* dn_commonname or csr_dn_commonname */
if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST["$reqdfields[$i]"]))
array_push($input_errors, "The field 'Distinguished name Common Name' contains invalid characters.");
- }else if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST["$reqdfields[$i]"]))
+ }else if (($reqdfields[$i] != "descr") && preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST["$reqdfields[$i]"]))
array_push($input_errors, "The field '" . $reqdfieldsn[$i] . "' contains invalid characters.");
}
OpenPOWER on IntegriCloud