Skip to content

Commit 15b96b9

Browse files
author
Till Brehm
committed
Fixed: FS#3131 - Wrong Apache setting for Subdomain (vhost) without hostname
1 parent c0a1a4d commit 15b96b9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

interface/web/sites/lib/lang/en_web_vhost_subdomain.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,5 @@ $wb['variables_txt'] = 'Variables';
124124
$wb['backup_excludes_txt'] = 'Excluded Directories';
125125
$wb['backup_excludes_note_txt'] = '(Separate multiple directories with commas. Example: web/cache/*,web/backup)';
126126
$wb['backup_excludes_error_regex'] = 'The excluded directories contain invalid characters.';
127+
$wb['subdomain_error_empty'] = 'The subdommain field is empty or contains invalid characters.';
127128
?>

interface/web/sites/web_vhost_subdomain_edit.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,11 @@ function onSubmit() {
348348

349349
if($app->tform->getCurrentTab() == 'domain') {
350350

351+
// Check that domain (the subdomain part) is not empty
352+
if(!preg_match('/^[a-zA-Z0-9].+/',$this->dataRecord['domain'])) {
353+
$app->tform->errorMessage .= $app->tform->lng("subdomain_error_empty")."<br />";
354+
}
355+
351356
/* check if the domain module is used - and check if the selected domain can be used! */
352357
$app->uses('ini_parser,getconf');
353358
$settings = $app->getconf->get_global_config('domains');

0 commit comments

Comments
 (0)