diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php index c447b1e851d4fd6052c874856fdeb64f7086760d..894ea0c0572bbc0d10f84423c080fb90c0dd54aa 100644 --- a/interface/web/sites/form/web_vhost_domain.tform.php +++ b/interface/web/sites/form/web_vhost_domain.tform.php @@ -447,7 +447,7 @@ if($ssl_available) { 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/', + 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/', 'errmsg'=> 'ssl_state_error_regex'), ), 'default' => '', @@ -459,7 +459,7 @@ if($ssl_available) { 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/', + 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/', 'errmsg'=> 'ssl_locality_error_regex'), ), 'default' => '', @@ -471,7 +471,7 @@ if($ssl_available) { 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/', + 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/', 'errmsg'=> 'ssl_organisation_error_regex'), ), 'default' => '', @@ -483,7 +483,7 @@ if($ssl_available) { 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/', + 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/', 'errmsg'=> 'ssl_organistaion_unit_error_regex'), ), 'default' => '', diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 86cc522008118412dcf02ae156ff2b2fa015828a..8bbc5e1fb00d2d625c68e786ceb8d0f605d0d79a 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -1415,10 +1415,6 @@ class page_action extends tform_actions { //* Check that all fields for the SSL cert creation are filled if(isset($this->dataRecord['ssl_action']) && $this->dataRecord['ssl_action'] == 'create') { - if($this->dataRecord['ssl_state'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_state_empty').'<br />'; - if($this->dataRecord['ssl_locality'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_locality_empty').'<br />'; - if($this->dataRecord['ssl_organisation'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_organisation_empty').'<br />'; - if($this->dataRecord['ssl_organisation_unit'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_organisation_unit_empty').'<br />'; if($this->dataRecord['ssl_country'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_country_empty').'<br />'; } diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 4a6437e92493877abcaf181df6eb66422fcf928d..76528c23284dd5441973a43d17d1291811dc1691 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -275,10 +275,10 @@ class apache2_plugin { [ req_distinguished_name ] C = ".trim($data['new']['ssl_country'])." - ST = ".trim($data['new']['ssl_state'])." - L = ".trim($data['new']['ssl_locality'])." - O = ".trim($data['new']['ssl_organisation'])." - OU = ".trim($data['new']['ssl_organisation_unit'])." + " . (trim($data['new']['ssl_state']) == '' ? '' : "ST = ".trim($data['new']['ssl_state'])) . " + " . (trim($data['new']['ssl_locality']) == '' ? '' : "L = ".trim($data['new']['ssl_locality']))." + " . (trim($data['new']['ssl_organisation']) == '' ? '' : "O = ".trim($data['new']['ssl_organisation']))." + " . (trim($data['new']['ssl_organisation_unit']) == '' ? '' : "OU = ".trim($data['new']['ssl_organisation_unit']))." CN = $domain emailAddress = webmaster@".$data['new']['domain']." diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index f4c5f9d5ba4bce0593321a012f0692d0c20d7f58..d351bb27301a5bacbc116f6587e99000d024b179 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -156,10 +156,10 @@ class nginx_plugin { [ req_distinguished_name ] C = ".trim($data['new']['ssl_country'])." - ST = ".trim($data['new']['ssl_state'])." - L = ".trim($data['new']['ssl_locality'])." - O = ".trim($data['new']['ssl_organisation'])." - OU = ".trim($data['new']['ssl_organisation_unit'])." + " . (trim($data['new']['ssl_state']) == '' ? '' : "ST = ".trim($data['new']['ssl_state'])) . " + " . (trim($data['new']['ssl_locality']) == '' ? '' : "L = ".trim($data['new']['ssl_locality']))." + " . (trim($data['new']['ssl_organisation']) == '' ? '' : "O = ".trim($data['new']['ssl_organisation']))." + " . (trim($data['new']['ssl_organisation_unit']) == '' ? '' : "OU = ".trim($data['new']['ssl_organisation_unit']))." CN = $domain emailAddress = webmaster@".$data['new']['domain']."