Skip to content

Commit 0c6ca56

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents 22efd48 + 2436971 commit 0c6ca56

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

interface/web/sites/form/web_vhost_domain.tform.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@
447447
'datatype' => 'VARCHAR',
448448
'formtype' => 'TEXT',
449449
'validators' => array ( 0 => array ( 'type' => 'REGEX',
450-
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
450+
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
451451
'errmsg'=> 'ssl_state_error_regex'),
452452
),
453453
'default' => '',
@@ -459,7 +459,7 @@
459459
'datatype' => 'VARCHAR',
460460
'formtype' => 'TEXT',
461461
'validators' => array ( 0 => array ( 'type' => 'REGEX',
462-
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
462+
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
463463
'errmsg'=> 'ssl_locality_error_regex'),
464464
),
465465
'default' => '',
@@ -471,7 +471,7 @@
471471
'datatype' => 'VARCHAR',
472472
'formtype' => 'TEXT',
473473
'validators' => array ( 0 => array ( 'type' => 'REGEX',
474-
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
474+
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
475475
'errmsg'=> 'ssl_organisation_error_regex'),
476476
),
477477
'default' => '',
@@ -483,7 +483,7 @@
483483
'datatype' => 'VARCHAR',
484484
'formtype' => 'TEXT',
485485
'validators' => array ( 0 => array ( 'type' => 'REGEX',
486-
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
486+
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
487487
'errmsg'=> 'ssl_organistaion_unit_error_regex'),
488488
),
489489
'default' => '',

interface/web/sites/web_vhost_domain_edit.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,10 +1415,6 @@ function onBeforeUpdate () {
14151415

14161416
//* Check that all fields for the SSL cert creation are filled
14171417
if(isset($this->dataRecord['ssl_action']) && $this->dataRecord['ssl_action'] == 'create') {
1418-
if($this->dataRecord['ssl_state'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_state_empty').'<br />';
1419-
if($this->dataRecord['ssl_locality'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_locality_empty').'<br />';
1420-
if($this->dataRecord['ssl_organisation'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_organisation_empty').'<br />';
1421-
if($this->dataRecord['ssl_organisation_unit'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_organisation_unit_empty').'<br />';
14221418
if($this->dataRecord['ssl_country'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_country_empty').'<br />';
14231419
}
14241420

server/plugins-available/apache2_plugin.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,10 @@ function ssl($event_name, $data) {
275275
276276
[ req_distinguished_name ]
277277
C = ".trim($data['new']['ssl_country'])."
278-
ST = ".trim($data['new']['ssl_state'])."
279-
L = ".trim($data['new']['ssl_locality'])."
280-
O = ".trim($data['new']['ssl_organisation'])."
281-
OU = ".trim($data['new']['ssl_organisation_unit'])."
278+
" . (trim($data['new']['ssl_state']) == '' ? '' : "ST = ".trim($data['new']['ssl_state'])) . "
279+
" . (trim($data['new']['ssl_locality']) == '' ? '' : "L = ".trim($data['new']['ssl_locality']))."
280+
" . (trim($data['new']['ssl_organisation']) == '' ? '' : "O = ".trim($data['new']['ssl_organisation']))."
281+
" . (trim($data['new']['ssl_organisation_unit']) == '' ? '' : "OU = ".trim($data['new']['ssl_organisation_unit']))."
282282
CN = $domain
283283
emailAddress = webmaster@".$data['new']['domain']."
284284

server/plugins-available/nginx_plugin.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ function ssl($event_name, $data) {
156156
157157
[ req_distinguished_name ]
158158
C = ".trim($data['new']['ssl_country'])."
159-
ST = ".trim($data['new']['ssl_state'])."
160-
L = ".trim($data['new']['ssl_locality'])."
161-
O = ".trim($data['new']['ssl_organisation'])."
162-
OU = ".trim($data['new']['ssl_organisation_unit'])."
159+
" . (trim($data['new']['ssl_state']) == '' ? '' : "ST = ".trim($data['new']['ssl_state'])) . "
160+
" . (trim($data['new']['ssl_locality']) == '' ? '' : "L = ".trim($data['new']['ssl_locality']))."
161+
" . (trim($data['new']['ssl_organisation']) == '' ? '' : "O = ".trim($data['new']['ssl_organisation']))."
162+
" . (trim($data['new']['ssl_organisation_unit']) == '' ? '' : "OU = ".trim($data['new']['ssl_organisation_unit']))."
163163
CN = $domain
164164
emailAddress = webmaster@".$data['new']['domain']."
165165

0 commit comments

Comments
 (0)