Marius Burkard
2016-05-04 c3189ce6c7301c3ec17878fd3918f31d0d3cb18a
Merge branch 'stable-3.1'
1 files added
45 files modified
299 ■■■■■ changed files
install/install.php 5 ●●●●● patch | view | raw | blame | history
install/sql/incremental/upd_0082.sql 1 ●●●● patch | view | raw | blame | history
install/tpl/apache_ispconfig.vhost.master 86 ●●●●● patch | view | raw | blame | history
install/update.php 2 ●●● patch | view | raw | blame | history
interface/lib/classes/json_handler.inc.php 2 ●●● patch | view | raw | blame | history
interface/lib/classes/tform_base.inc.php 19 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/de_server_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/en_server_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/templates/system_config_domains_edit.htm 12 ●●●● patch | view | raw | blame | history
interface/web/client/form/client.tform.php 16 ●●●● patch | view | raw | blame | history
interface/web/client/form/reseller.tform.php 16 ●●●● patch | view | raw | blame | history
interface/web/client/templates/client_template_edit_limits.htm 2 ●●● patch | view | raw | blame | history
interface/web/client/templates/domain_list.htm 4 ●●●● patch | view | raw | blame | history
interface/web/dashboard/dashlets/templates/modules.htm 4 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/ar_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/bg_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/br_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/ca_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/cz_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/de_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/el_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/en_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/es_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/fi_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/fr_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/hr_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/hu_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/id_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/it_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/ja_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/nl_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/pl_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/pt_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/ro_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/ru_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/se_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/sk_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/lang/tr_dashlet_modules.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_alias.tform.php 2 ●●● patch | view | raw | blame | history
interface/web/dns/form/dns_soa.tform.php 2 ●●● patch | view | raw | blame | history
interface/web/sites/templates/web_sites_stats_list.htm 16 ●●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_domain_edit.php 1 ●●●● patch | view | raw | blame | history
server/conf/apache_ispconfig.conf.master 13 ●●●● patch | view | raw | blame | history
server/conf/nginx_vhost.conf.master 8 ●●●● patch | view | raw | blame | history
server/plugins-available/apache2_plugin.inc.php 31 ●●●● patch | view | raw | blame | history
server/plugins-available/nginx_plugin.inc.php 31 ●●●● patch | view | raw | blame | history
install/install.php
@@ -344,12 +344,13 @@
        $conf['services']['dns'] = true;
    }
*/
    //* Configure Bind
    if($conf['bind']['installed']) {
        swriteln('Configuring BIND');
        $inst->configure_bind();
        $conf['services']['dns'] = true;
        if(!$inst->find_installed_apps('haveged')) {
        if(!is_installed('haveged')) {
            swriteln("[INFO] haveged not detected - DNSSEC can fail");
        }
    }
@@ -732,7 +733,7 @@
            swriteln('Configuring BIND');
            $inst->configure_bind();
            $conf['services']['dns'] = true;
            if(!$inst->find_installed_apps('haveged')) {
            if(!is_installed('haveged')) {
                swriteln("[INFO] haveged not detected - DNSSEC can fail");
            }
        }
install/sql/incremental/upd_0082.sql
New file
@@ -0,0 +1 @@
ALTER TABLE `directive_snippets` ADD `master_directive_snippets_id` int(11) unsigned NOT NULL DEFAULT '0' AFTER `active`;
install/tpl/apache_ispconfig.vhost.master
@@ -8,101 +8,111 @@
<VirtualHost _default_:<tmpl_var name="vhost_port">>
  ServerAdmin webmaster@localhost
  <FilesMatch "\.ph(p3?|tml)$">
    SetHandler None
  </FilesMatch>
  <IfModule mod_fcgid.c>
    DocumentRoot /var/www/ispconfig/
    SuexecUserGroup ispconfig ispconfig
    <Directory /var/www/ispconfig/>
      Options -Indexes +FollowSymLinks +MultiViews +ExecCGI
      AllowOverride AuthConfig Indexes Limit Options FileInfo
      <FilesMatch "\.php$">
          SetHandler fcgid-script
      </FilesMatch>
      <FilesMatch "\.php$">
        SetHandler fcgid-script
      </FilesMatch>
      FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
      <tmpl_if name='apache_version' op='>' value='2.2' format='version'>
      Require all granted
      <tmpl_else>
      Require all granted
      <tmpl_else>
      Order allow,deny
      Allow from all
      </tmpl_if>
      </tmpl_if>
    </Directory>
    IPCCommTimeout  7200
    MaxRequestLen 15728640
    MaxRequestLen 15728640
  </IfModule>
  <IfModule mpm_itk_module>
    DocumentRoot /usr/local/ispconfig/interface/web/
    AssignUserId ispconfig ispconfig
    AssignUserId ispconfig ispconfig
    AddType application/x-httpd-php .php
    <Directory /usr/local/ispconfig/interface/web>
      # php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp"
      Options +FollowSymLinks
      AllowOverride None
      <tmpl_if name='apache_version' op='>' value='2.2' format='version'>
      Require all granted
      <tmpl_else>
      Require all granted
      <tmpl_else>
      Order allow,deny
      Allow from all
      </tmpl_if>
      php_value magic_quotes_gpc        0
      </tmpl_if>
      php_value magic_quotes_gpc        0
    </Directory>
  </IfModule>
  # ErrorLog /var/log/apache2/error.log
  # CustomLog /var/log/apache2/access.log combined
  ServerSignature Off
  <IfModule mod_security2.c>
    SecRuleEngine Off
  </IfModule>
  # SSL Configuration
  <tmpl_var name="ssl_comment">SSLEngine On
  <tmpl_if name='apache_version' op='>=' value='2.3.16' format='version'>
  <tmpl_var name="ssl_comment">SSLProtocol All -SSLv3
  <tmpl_else>
  <tmpl_var name="ssl_comment">SSLProtocol All -SSLv2 -SSLv3
  </tmpl_if>
  <tmpl_var name="ssl_comment">SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
  <tmpl_var name="ssl_comment">SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
  <tmpl_var name="ssl_bundle_comment">SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle
  <tmpl_var name="ssl_comment">SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
  <tmpl_var name="ssl_comment">SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
  <tmpl_var name="ssl_comment">SSLHonorCipherOrder On
  <tmpl_if name='apache_version' op='>=' value='2.4.3' format='version'>
  <tmpl_var name="ssl_comment">SSLCompression Off
  </tmpl_if>
  <tmpl_if name='apache_version' op='>=' value='2.4.11' format='version'>
  <tmpl_var name="ssl_comment">SSLSessionTickets Off
  </tmpl_if>
  <IfModule mod_headers.c>
    Header always add Strict-Transport-Security "max-age=15768000"
  </IfModule>
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
  <tmpl_var name="ssl_comment">SSLUseStapling on
  <tmpl_if name='apache_version' op='>=' value='2.3.3' format='version'>
  <tmpl_var name="ssl_comment">SSLUseStapling On
  <tmpl_var name="ssl_comment">SSLStaplingResponderTimeout 5
  <tmpl_var name="ssl_comment">SSLStaplingReturnResponderErrors off
</tmpl_if>
  <tmpl_var name="ssl_comment">SSLStaplingReturnResponderErrors Off
  </tmpl_if>
</VirtualHost>
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
<tmpl_if name='apache_version' op='>=' value='2.3.3' format='version'>
<IfModule mod_ssl.c>
  <tmpl_var name="ssl_comment">SSLStaplingCache shmcb:/var/run/ocsp(128000)
</IfModule>
</tmpl_if>
<Directory /var/www/php-cgi-scripts>
    AllowOverride None
    <tmpl_if name='apache_version' op='>' value='2.2' format='version'>
    Require all denied
    <tmpl_else>
    Order Deny,Allow
    Deny from all
    </tmpl_if>
  AllowOverride None
  <tmpl_if name='apache_version' op='>' value='2.2' format='version'>
  Require all denied
  <tmpl_else>
  Order Deny,Allow
  Deny from all
  </tmpl_if>
</Directory>
<Directory /var/www/php-fcgi-scripts>
    AllowOverride None
    <tmpl_if name='apache_version' op='>' value='2.2' format='version'>
    Require all denied
    <tmpl_else>
    Order Deny,Allow
    Deny from all
    </tmpl_if>
</Directory>
  AllowOverride None
  <tmpl_if name='apache_version' op='>' value='2.2' format='version'>
  Require all denied
  <tmpl_else>
  Order Deny,Allow
  Deny from all
  </tmpl_if>
</Directory>
install/update.php
@@ -378,7 +378,7 @@
        } elseif($conf['bind']['installed'] == true) {
            swriteln('Configuring BIND');
            $inst->configure_bind();
            if(!$inst->find_installed_apps('haveged')) {
            if(!is_installed('haveged')) {
                swriteln("[INFO] haveged not detected - DNSSEC can fail");
            }
        } else {
interface/lib/classes/json_handler.inc.php
@@ -91,7 +91,7 @@
        if(is_array($_POST)) {
            foreach($_POST as $key => $val) {
                $tmp = json_decode($val);
                $tmp = json_decode($val, true);
                if(!$tmp) $params[] = $val;
                else $params[] = (array)$tmp;
            }
interface/lib/classes/tform_base.inc.php
@@ -831,7 +831,7 @@
                }
                //* Add slashes to all records, when we encode data which shall be inserted into mysql.
                if($dbencode == true) $new_record[$key] = $app->db->quote($new_record[$key]);
                if($dbencode == true && !is_null($new_record[$key])) $new_record[$key] = $app->db->quote($new_record[$key]);
            }
        }
        return $new_record;
@@ -973,13 +973,22 @@
                        $this->errorMessage .= $errmsg."<br />\r\n";
                    }
                }
                break;
            case 'ISEMAIL':
                $error = false;
                if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n';
                if($validator['allowempty'] == 'y' && $field_value == '') {
                    //* Do nothing
                } else {
                    if(function_exists('filter_var')) {
                        if(filter_var($field_value, FILTER_VALIDATE_EMAIL) === false) {
                            $error = true;
                        } else {
                            if (!preg_match("/^[^\\+]+$/", $field_value)) { // * disallow + in local-part
                                $error = true;
                            }
                        }
                        if ($error) {
                            $errmsg = $validator['errmsg'];
                            if(isset($this->wordbook[$errmsg])) {
                                $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
@@ -987,8 +996,10 @@
                                $this->errorMessage .= $errmsg."<br />\r\n";
                            }
                        }
                    } else $this->errorMessage .= "function filter_var missing <br />\r\n";
                }
                unset($error);
                break;
            case 'ISINT':
                if(function_exists('filter_var') && $field_value < 2147483647) {
@@ -1028,7 +1039,7 @@
                break;
            case 'V6PREFIXLENGTH':
                // find shortes ipv6 subnet can`t be longer
                $sql_v6 = $app->db->queryOneRecord("SELECT ip_address FROM server_ip WHERE ip_type = 'IPv6' AND virtualhost = 'y' ORDER BY CHAR_LENGTH(ip_address) ASC LIMIT 0,1;");
                $sql_v6 = $app->db->queryOneRecord("SELECT ip_address FROM server_ip WHERE ip_type = 'IPv6' AND virtualhost = 'y' ORDER BY CHAR_LENGTH(ip_address) ASC LIMIT 0,1");
                $sql_v6_explode=explode(':',$sql_v6['ip_address']);
                $explode_field_value = explode(':',$field_value);
                if (count($sql_v6_explode) < count($explode_field_value) && isset($sql_v6['ip_address'])) {
@@ -1233,7 +1244,7 @@
                            }
                        } else {
                            $sql_insert_key .= "`$key`, ";
                            $sql_insert_val .= "'".$record[$key]."', ";
                            $sql_insert_val .= (is_null($record[$key]) ? 'NULL' : "'".$record[$key]."'") . ", ";
                        }
                    } else {
                        if($field['formtype'] == 'PASSWORD') {
@@ -1260,7 +1271,7 @@
                                $sql_update .= "`$key` = '".$record[$key]."', ";
                            }
                        } else {
                            $sql_update .= "`$key` = '".$record[$key]."', ";
                            $sql_update .= "`$key` = " . (is_null($record[$key]) ? 'NULL' : "'".$record[$key]."'") . ", ";
                        }
                    }
                } else {
interface/web/admin/lib/lang/de_server_config.lng
@@ -173,6 +173,7 @@
$wb['backup_mode_txt'] = 'Backupmodus';
$wb['backup_mode_userzip'] = 'Backup Dateien gehören dem Web Benutzer (.zip Datei)';
$wb['backup_mode_rootgz'] = 'Backup aller Dateien des Webverzeichnisses als Root Benutzer';
$wb['backup_time_txt'] = 'Backupzeit';
$wb['firewall_txt'] = 'Firewall';
$wb['mailbox_quota_stats_txt'] = 'E-Mailkonto Beschränkung Statistiken';
$wb['enable_ip_wildcard_txt'] = 'IP Adressen Wildcard (*) aktivieren';
interface/web/admin/lib/lang/en_server_config.lng
@@ -101,6 +101,7 @@
$wb["backup_mode_txt"] = 'Backup mode';
$wb["backup_mode_userzip"] = 'Backup web files owned by web user as zip';
$wb["backup_mode_rootgz"] = 'Backup all files in web directory as root user';
$wb["backup_time_txt"] = 'Backup time';
$wb["server_type_txt"] = 'Server Type';
$wb["nginx_vhost_conf_dir_txt"] = 'Nginx Vhost config dir';
$wb["nginx_vhost_conf_enabled_dir_txt"] = 'Nginx Vhost config enabled dir';
interface/web/admin/templates/system_config_domains_edit.htm
@@ -6,13 +6,13 @@
<tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if>
            <div class="form-group">
                <div style="float:left;width:100%">
                    <p class="label" style="width:270px">{tmpl_var name='use_domain_module_txt'}</p>
                    <div class="col-sm-9">
                        {tmpl_var name='use_domain_module'}
                    </div>
                <div class="col-sm-3 text-right">
                    {tmpl_var name='use_domain_module'}
                </div>
                <div style="float:left;width:500px;margin-top:20px">{tmpl_var name='use_domain_module_hint'}</div>
                <div class="col-sm-9">
                    <p><strong>{tmpl_var name='use_domain_module_txt'}</strong></p>
                    <p>{tmpl_var name='use_domain_module_hint'}</p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='new_domain_txt'}</label>
interface/web/client/form/client.tform.php
@@ -594,9 +594,7 @@
                'class'=> 'custom_datasource',
                'function'=> 'client_servers'
            ),
            'validators'    => array (  0 => array (    'type'  => 'NOTEMPTY',
                    'errmsg'=> 'no_mail_server_error'),
                1 => array ( 'type' => 'CUSTOM',
            'validators'    => array (  0 => array ( 'type' => 'CUSTOM',
                    'class' => 'validate_client',
                    'function' => 'check_used_servers',
                    'errmsg'=> 'mail_servers_used'),
@@ -919,9 +917,7 @@
                'class'=> 'custom_datasource',
                'function'=> 'client_servers'
            ),
            'validators'    => array (  0 => array (    'type'  => 'NOTEMPTY',
                    'errmsg'=> 'no_web_server_error'),
                1 => array ( 'type' => 'CUSTOM',
            'validators'    => array (  0 => array ( 'type' => 'CUSTOM',
                    'class' => 'validate_client',
                    'function' => 'check_used_servers',
                    'errmsg'=> 'web_servers_used'),
@@ -1141,9 +1137,7 @@
                'class'=> 'custom_datasource',
                'function'=> 'client_servers'
            ),
            'validators'    => array (  0 => array (    'type'  => 'NOTEMPTY',
                    'errmsg'=> 'no_dns_server_error'),
                1 => array ( 'type' => 'CUSTOM',
            'validators'    => array (  0 => array ( 'type' => 'CUSTOM',
                    'class' => 'validate_client',
                    'function' => 'check_used_servers',
                    'errmsg'=> 'dns_servers_used'),
@@ -1238,9 +1232,7 @@
                'class'=> 'custom_datasource',
                'function'=> 'client_servers'
            ),
            'validators'    => array (  0 => array (    'type'  => 'NOTEMPTY',
                    'errmsg'=> 'no_db_server_error'),
                1 => array ( 'type' => 'CUSTOM',
            'validators'    => array (  0 => array ( 'type' => 'CUSTOM',
                    'class' => 'validate_client',
                    'function' => 'check_used_servers',
                    'errmsg'=> 'db_servers_used'),
interface/web/client/form/reseller.tform.php
@@ -593,9 +593,7 @@
                'keyfield'=> 'server_id',
                'valuefield'=> 'server_name'
            ),
            'validators'    => array (  0 => array (    'type'  => 'NOTEMPTY',
                    'errmsg'=> 'no_mail_server_error'),
                1 => array ( 'type' => 'CUSTOM',
            'validators'    => array (  0 => array ( 'type' => 'CUSTOM',
                    'class' => 'validate_client',
                    'function' => 'check_used_servers',
                    'errmsg'=> 'mail_servers_used'),
@@ -918,9 +916,7 @@
                'keyfield'=> 'server_id',
                'valuefield'=> 'server_name'
            ),
            'validators'    => array (  0 => array (    'type'  => 'NOTEMPTY',
                    'errmsg'=> 'no_web_server_error'),
                1 => array ( 'type' => 'CUSTOM',
            'validators'    => array (  0 => array ( 'type' => 'CUSTOM',
                    'class' => 'validate_client',
                    'function' => 'check_used_servers',
                    'errmsg'=> 'web_servers_used'),
@@ -1138,9 +1134,7 @@
                'keyfield'=> 'server_id',
                'valuefield'=> 'server_name'
            ),
            'validators'    => array (  0 => array (    'type'  => 'NOTEMPTY',
                    'errmsg'=> 'no_dns_server_error'),
                1 => array ( 'type' => 'CUSTOM',
            'validators'    => array (  0 => array ( 'type' => 'CUSTOM',
                    'class' => 'validate_client',
                    'function' => 'check_used_servers',
                    'errmsg'=> 'dns_servers_used'),
@@ -1238,9 +1232,7 @@
                'keyfield'=> 'server_id',
                'valuefield'=> 'server_name'
            ),
            'validators'    => array (  0 => array (    'type'  => 'NOTEMPTY',
                    'errmsg'=> 'no_db_server_error'),
                1 => array ( 'type' => 'CUSTOM',
            'validators'    => array (  0 => array ( 'type' => 'CUSTOM',
                    'class' => 'validate_client',
                    'function' => 'check_used_servers',
                    'errmsg'=> 'db_servers_used'),
interface/web/client/templates/client_template_edit_limits.htm
@@ -138,7 +138,7 @@
        </a>
      </h4>
    </div>
    <div id="collapseMail" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingMail>
    <div id="collapseMail" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingMail">
      <div class="panel-body">
                <div class="form-group">
                    <label for="limit_maildomain" class="col-sm-3 control-label">{tmpl_var name='limit_maildomain_txt'}</label>
interface/web/client/templates/domain_list.htm
@@ -45,10 +45,10 @@
            <tfoot>
                <tr>
                    <td colspan="4"><tmpl_var name="paging"></td>
                    <td colspan="3"><tmpl_var name="paging"></td>
                </tr>
            </tfoot>
            </table>
</div>
        
interface/web/dashboard/dashlets/templates/modules.htm
@@ -9,8 +9,8 @@
                <div class='title'>{tmpl_var name='modules_title'}</div>
              </div>
            </div>
            <a href='#' class='btn btn-default button' data-capp='{tmpl_var name="modules_name"}'>Go to {tmpl_var name='modules_title'}</a>
            <a href='#' class='btn btn-default button' data-capp='{tmpl_var name="modules_name"}'>{tmpl_var name='go_to_txt'} {tmpl_var name='modules_title'}</a>
        </li>
    </tmpl_loop>
    </ul>
    </div>
    </div>
interface/web/dashboard/lib/lang/ar_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Available Modules';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/bg_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Налични Модули';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/br_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Módulos Disponíveis';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/ca_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Modules disponibles';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/cz_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Dostupné moduly';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/de_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Verfügbare Module';
$wb['go_to_txt'] = 'Gehe zu';
?>
interface/web/dashboard/lib/lang/el_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Διαθέσιμα αρθρώματα';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/en_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = "Available Modules";
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/es_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Módulos disponibles';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/fi_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Available Modules';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/fr_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Modules disponibles';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/hr_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Dostupni moduli';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/hu_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Elérhető Modulok';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/id_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Modul yang tersedia';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/it_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Moduli disponibili';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/ja_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Available Modules';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/nl_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Beschikbare modules';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/pl_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Dostępne moduły';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/pt_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Available Modules';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/ro_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Available Modules';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/ru_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Доступные модули';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/se_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Tillgängliga moduler';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/sk_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Available Modules';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dashboard/lib/lang/tr_dashlet_modules.lng
@@ -1,3 +1,4 @@
<?php
$wb['available_modules_txt'] = 'Kullanılabilecek Modüller';
$wb['go_to_txt'] = 'Go to';
?>
interface/web/dns/form/dns_alias.tform.php
@@ -88,7 +88,7 @@
            'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
                    'errmsg'=> 'name_error_empty'),
                1 => array ( 'type' => 'REGEX',
                    'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/',
                    'regex' => '/^[a-zA-Z0-9\.\-\_]{1,255}$/',
                    'errmsg'=> 'name_error_regex'),
            ),
            'default' => '',
interface/web/dns/form/dns_soa.tform.php
@@ -137,7 +137,7 @@
            'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
                    'errmsg'=> 'mbox_error_empty'),
                1 => array ( 'type' => 'REGEX',
                    'regex' => '/^[a-zA-Z0-9\.\-\_]{0,255}\.$/',
                    'regex' => '/^[a-zA-Z0-9\.\-\_\+]{0,255}\.$/',
                    'errmsg'=> 'mbox_error_regex'),
            ),
            'default' => '',
interface/web/sites/templates/web_sites_stats_list.htm
@@ -31,10 +31,10 @@
                <tmpl_loop name="records">
                    <tr>
                        <td><a target="_blank" href="http://{tmpl_var name="domain"}/stats">{tmpl_var name="domain"}</a></td>
                        <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="this_month"} MB</a></td>
                        <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="last_month"} MB</a></td>
                        <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="this_year"} MB</a></td>
                        <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="last_year"} MB</a></td>
                        <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="this_month"}</a></td>
                        <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="last_month"}</a></td>
                        <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="this_year"}</a></td>
                        <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="last_year"}</a></td>
                        <td class="text-right"></td>
                    </tr>
                </tmpl_loop>
@@ -45,10 +45,10 @@
                </tmpl_unless>
                    <tr>
                        <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_txt"}</a></td>
                        <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_this_month"} MB</a></td>
                        <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_last_month"} MB</a></td>
                        <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_this_year"} MB</a></td>
                        <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_last_year"} MB</a></td>
                        <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_this_month"}</a></td>
                        <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_last_month"}</a></td>
                        <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_this_year"}</a></td>
                        <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_last_year"}</a></td>
                        <td class="text-right"></td>
                    </tr>
                </tbody>
interface/web/sites/web_vhost_domain_edit.php
@@ -757,6 +757,7 @@
         * Now we have to check, if we should use the domain-module to select the domain
         * or not
         */
        $settings = $app->getconf->get_global_config('domains');
        if ($settings['use_domain_module'] == 'y') {
            /*
             * The domain-module is in use.
server/conf/apache_ispconfig.conf.master
@@ -6,6 +6,12 @@
LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig
<IfModule mod_headers.c>
    <LocationMatch "/.well-known/acme-challenge/*">
        Header set Content-Type "text/plain"
    </LocationMatch>
</IfModule>
<Directory /var/www/clients>
    AllowOverride None
    <tmpl_if name='apache_version' op='>' value='2.2' format='version'>
@@ -14,13 +20,6 @@
    Order Deny,Allow
    Deny from all
    </tmpl_if>
 <IfModule mod_headers.c>
    <LocationMatch "/.well-known/acme-challenge/*">
      Header set Content-Type "text/plain"
    </LocationMatch>
  </IfModule>
</Directory>
# Do not allow access to the root file system of the server for security reasons
server/conf/nginx_vhost.conf.master
@@ -263,8 +263,8 @@
        }
</tmpl_if>
location /\.well-known/acme-challenge {
       root /usr/local/ispconfig/interface/acme/.well-known/acme-challenge;
location ~ /\.well-known/acme-challenge/ {
       root /usr/local/ispconfig/interface/acme/;
       index index.html index.htm;
       try_files $uri =404;
}
@@ -301,8 +301,8 @@
        
        server_name <tmpl_var name='rewrite_domain'>;
location /\.well-known/acme-challenge {
       root /usr/local/ispconfig/interface/acme-challenge;
location ~ /\.well-known/acme-challenge/ {
       root /usr/local/ispconfig/interface/acme/;
       index index.html index.htm;
       try_files $uri =404;
}
server/plugins-available/apache2_plugin.inc.php
@@ -1232,11 +1232,22 @@
            //* check if we have already a Let's Encrypt cert
            if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) {
                $app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG);
                $success = false;
                if(file_exists("/root/.local/share/letsencrypt/bin/letsencrypt")) {
                    $this->_exec("/root/.local/share/letsencrypt/bin/letsencrypt auth --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme");
                    $success = $this->_exec("/root/.local/share/letsencrypt/bin/letsencrypt auth --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme");
                }
            };
                if(!$success) {
                    // error issuing cert
                    $app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN);
                    $data['new']['ssl_letsencrypt'] = 'n';
                    if($data['old']['ssl'] == 'n') $data['new']['ssl'] = 'n';
                    /* Update the DB of the (local) Server */
                    $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']);
                    /* Update also the master-DB of the Server-Farm */
                    $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']);
                }
            }
            //* check is been correctly created
            if(file_exists($crt_tmp_file) OR file_exists($key_tmp_file)) {
@@ -1279,11 +1290,11 @@
                /* we don't need to store it.
                /* Update the DB of the (local) Server */
                $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '$ssl_cert', ssl_key = '$ssl_key' WHERE domain = '".$data['new']['domain']."'");
                $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'");
                $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']);
                $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']);
                /* Update also the master-DB of the Server-Farm */
                $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '$ssl_cert', ssl_key = '$ssl_key' WHERE domain = '".$data['new']['domain']."'");
                $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'");
                $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']);
                $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']);
            }
        }
@@ -3363,8 +3374,12 @@
    //* Wrapper for exec function for easier debugging
    private function _exec($command) {
        global $app;
        $out = array();
        $ret = 0;
        $app->log('exec: '.$command, LOGLEVEL_DEBUG);
        exec($command);
        exec($command, $out, $ret);
        if($ret != 0) return false;
        else return true;
    }
    private function _checkTcp ($host, $port) {
server/plugins-available/nginx_plugin.inc.php
@@ -1310,11 +1310,22 @@
            //* check if we have already a Let's Encrypt cert
            if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) {
                $app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG);
                $success = false;
                if(file_exists("/root/.local/share/letsencrypt/bin/letsencrypt")) {
                    $this->_exec("/root/.local/share/letsencrypt/bin/letsencrypt auth --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme");
                    $success = $this->_exec("/root/.local/share/letsencrypt/bin/letsencrypt auth --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme");
                }
            };
                if(!$success) {
                    // error issuing cert
                    $app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN);
                    $data['new']['ssl_letsencrypt'] = 'n';
                    if($data['old']['ssl'] == 'n') $data['new']['ssl'] = 'n';
                    /* Update the DB of the (local) Server */
                    $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']);
                    /* Update also the master-DB of the Server-Farm */
                    $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']);
                }
            }
            //* check is been correctly created
            if(file_exists($crt_tmp_file) OR file_exists($key_tmp_file)) {
@@ -1346,11 +1357,11 @@
                /* we don't need to store it.
                /* Update the DB of the (local) Server */
                $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = '".$data['new']['domain']."'");
                $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'");
                $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']);
                $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']);
                /* Update also the master-DB of the Server-Farm */
                $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = '".$data['new']['domain']."'");
                $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'");
                $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']);
                $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']);
            }
        };
@@ -3103,8 +3114,12 @@
    //* Wrapper for exec function for easier debugging
    private function _exec($command) {
        global $app;
        $out = array();
        $ret = 0;
        $app->log('exec: '.$command, LOGLEVEL_DEBUG);
        exec($command);
        exec($command, $out, $ret);
        if($ret != 0) return false;
        else return true;
    }
    private function _checkTcp ($host, $port) {