Skip to content

Commit cbe258b

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1
2 parents 864a343 + d5869a6 commit cbe258b

File tree

9 files changed

+46
-13
lines changed

9 files changed

+46
-13
lines changed

helper_scripts/mydns_to_powerdns_migration.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,28 @@
3131
{
3232
$file2=$row2['data'];
3333
}
34+
35+
//
36+
// Fix for 'domain.ext.' apex notation
37+
//
38+
$record_name_end=substr($row2['name'], -1);
39+
if ($record_name_end==".")
40+
{
41+
// remove trailing dot from apex
42+
$record_name = substr($row2['name'], 0, strlen($row2['name'])-1);
43+
}
44+
else
45+
{
46+
// add domain to make it a fqdn
47+
$record_name = $row2['name'] . "." . $row3['origin'];
48+
}
49+
50+
print "$row2[name].$row3[origin]" . " $record_name\r\n";
3451
mysql_select_db("dbispconfig");
3552
$sql3 = mysql_query("SELECT substr(origin,1, LENGTH(origin)-1) AS origin FROM dns_soa where id=$row2[zone];");
3653
$row3 = mysql_fetch_array($sql3);
3754
mysql_select_db("powerdns");
38-
mysql_query("INSERT INTO records (domain_id,name,content,ispconfig_id,type,ttl,prio,change_date) values ('$row2[zone]','$row2[name].$row3[origin]','$file2','$row2[id]','$row2[type]','$row2[ttl]','$row2[aux]','1260446221');");
55+
mysql_query("INSERT INTO records (domain_id,name,content,ispconfig_id,type,ttl,prio,change_date) values ('$row2[zone]','$record_name','$file2','$row2[id]','$row2[type]','$row2[ttl]','$row2[aux]','1260446221');");
3956
}
4057
else
4158
{

install/dist/lib/centos_base.lib.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,17 @@ public function configure_amavis() {
5252
wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
5353
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
5454

55+
if(!is_file($conf['amavis']['config_dir'].'/60-dkim')) {
56+
touch($conf['amavis']['config_dir'].'/60-dkim');
57+
chmod($conf['amavis']['config_dir'].'/60-dkim', 0640);
58+
}
59+
5560
// for CentOS 7.2 only
5661
if($dist['confid'] == 'centos72') {
5762
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0750);
5863
chgrp($conf['amavis']['config_dir'].'/amavisd.conf', 'amavis');
64+
chmod($conf['amavis']['config_dir'].'/60-dkim', 0750);
65+
chgrp($conf['amavis']['config_dir'].'/60-dkim', 'amavis');
5966
}
6067

6168

install/lib/install.lib.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ function get_distname() {
178178
break;
179179
default:
180180
$relname = "UNKNOWN";
181+
$distconfid = 'ubuntu1604';
181182
}
182183
$distver = $ver.$lts." ".$relname;
183184
swriteln("Operating System: ".$distname.' '.$distver."\n");
@@ -228,7 +229,8 @@ function get_distname() {
228229
} else {
229230
$distname = 'Debian';
230231
$distver = 'Unknown';
231-
$distid = 'debian40';
232+
$distid = 'debian60';
233+
$distconfid = 'debian90';
232234
$distbaseid = 'debian';
233235
swriteln("Operating System: Debian or compatible, unknown version.\n");
234236
}

interface/web/mail/xmpp_domain_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function onSubmit() {
223223
/* check if the domain module is used - and check if the selected domain can be used! */
224224
$app->uses('ini_parser,getconf');
225225
$settings = $app->getconf->get_global_config('domains');
226-
if ($settings['use_domain_module'] == 'y') {
226+
if ((isset($this->dataRecord['domain'])) && ($settings['use_domain_module'] == 'y')) {
227227
if ($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
228228
$this->dataRecord['client_group_id'] = $app->tools_sites->getClientIdForDomain($this->dataRecord['domain']);
229229
}

server/conf/nginx_vhost.conf.master

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ server {
131131
location = /favicon.ico {
132132
log_not_found off;
133133
access_log off;
134+
expires max;
135+
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
134136
}
135137

136138
location = /robots.txt {

server/conf/php-fcgi-starter.master

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ export TMPDIR=<tmpl_var name='document_root'>/tmp
1414
export TEMP=<tmpl_var name='document_root'>/tmp
1515
exec <tmpl_var name='php_fcgi_bin'> \
1616
<tmpl_if name="security_level" op="==" value="20"> -d open_basedir="<tmpl_var name='open_basedir'>" \
17-
-d disable_functions="" \
18-
-d suhosin.executor.func.blacklist="" \
1917
-d upload_tmp_dir=<tmpl_var name='document_root'>/tmp \
2018
-d session.save_path=<tmpl_var name='document_root'>/tmp \
2119
-d sendmail_path="/usr/sbin/sendmail -t -i -f webmaster@<tmpl_var name='domain'>" \

server/conf/vhost.conf.master

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182

183183
<tmpl_if name='python' op='==' value='y'>
184184
<IfModule mod_python.c>
185-
<Directory {tmpl_var name='web_document_root_www'}>
185+
<Directory {tmpl_var name='web_document_root'}>
186186
<FilesMatch "\.py$">
187187
SetHandler mod_python
188188
</FilesMatch>
@@ -350,10 +350,10 @@
350350
Action php5-fcgi /php5-fcgi virtual
351351
Alias /php5-fcgi {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'}
352352
<tmpl_if name='use_tcp'>
353-
FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -host 127.0.0.1:<tmpl_var name='fpm_port'> -pass-header Authorization
353+
FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -host 127.0.0.1:<tmpl_var name='fpm_port'> -pass-header Authorization -pass-header Content-Type
354354
</tmpl_if>
355355
<tmpl_if name='use_socket'>
356-
FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket <tmpl_var name='fpm_socket'> -pass-header Authorization
356+
FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket <tmpl_var name='fpm_socket'> -pass-header Authorization -pass-header Content-Type
357357
</tmpl_if>
358358
</IfModule>
359359
<IfModule mod_proxy_fcgi.c>
@@ -404,7 +404,7 @@
404404
</Directory>
405405
Action hhvm-fcgi /hhvm-fcgi virtual
406406
Alias /hhvm-fcgi {tmpl_var name='document_root'}/cgi-bin/hhvm-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'}
407-
FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/hhvm-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket /var/run/hhvm/hhvm.<tmpl_var name='system_user'>.sock -pass-header Authorization
407+
FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/hhvm-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket /var/run/hhvm/hhvm.<tmpl_var name='system_user'>.sock -pass-header Authorization -pass-header Content-Type
408408
</IfModule>
409409
<IfModule mod_proxy_fcgi.c>
410410
<Directory {tmpl_var name='document_root'}/cgi-bin>

server/plugins-available/apache2_plugin.inc.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2789,7 +2789,11 @@ private function _patchVhostWebdav($fileName, $webdavRoot) {
27892789
$output .= " DAV On\n";
27902790
$output .= ' BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On'."\n";
27912791
$output .= " AuthType Digest\n";
2792-
$output .= " AuthName \"Restricted Area\"\n";
2792+
if($fn != '' && $fn != '/') {
2793+
$output .= " AuthName \"" . $fn . "\"\n";
2794+
} else {
2795+
$output .= " AuthName \"Restricted Area\"\n";
2796+
}
27932797
$output .= " AuthUserFile " . $webdavRoot . '/' . $file . "\n";
27942798
$output .= " Require valid-user \n";
27952799
$output .= " Options +Indexes \n";

server/plugins-available/mysql_clientdb_plugin.inc.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,16 @@ function process_host_list($action, $database_name, $database_user, $database_pa
7878
$unwanted_sql_plugins = array('validate_password'); // strict-password-validation
7979
$temp = "'".implode("','", $unwanted_sql_plugins)."'";
8080
$result = $link->query("SELECT plugin_name FROM information_schema.plugins WHERE plugin_status='ACTIVE' AND plugin_name IN ($temp)");
81-
if($result) {
81+
if($result && $result->num_rows > 0) {
82+
$sql_plugins = array();
8283
while ($row = $result->fetch_assoc()) {
8384
$sql_plugins[] = $row['plugin_name'];
8485
}
8586
$result->free();
86-
foreach ($sql_plugins as $plugin) $app->log("MySQL-Plugin $plugin enabled - can not execute function process_host_list", LOGLEVEL_ERROR);
87-
return false;
87+
if(count($sql_plugins) > 0) {
88+
foreach ($sql_plugins as $plugin) $app->log("MySQL-Plugin $plugin enabled - can not execute function process_host_list", LOGLEVEL_ERROR);
89+
return false;
90+
}
8891
}
8992

9093
if(!$user_access_mode) $user_access_mode = 'rw';

0 commit comments

Comments
 (0)