Skip to content

Commit 7a2f323

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents 6f4ac3d + 6165e36 commit 7a2f323

File tree

6 files changed

+24
-9
lines changed

6 files changed

+24
-9
lines changed

install/dist/lib/gentoo.lib.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ public function configure_dovecot()
345345
if(version_compare($dovecot_version,2, '>=')) {
346346
$content = str_replace('# iterate_query', 'iterate_query', $content);
347347
}
348+
$content = str_replace('{server_id}', $conf['server_id'], $content);
348349
$this->write_config_file($configfile, $content);
349350
}
350351

install/dist/tpl/gentoo/amavisd-ispconfig.conf.master

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ $sql_select_policy =
5555

5656

5757
$sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'.
58-
' WHERE (spamfilter_wblist.rid=?) AND (spamfilter_wblist.email IN (%k))' .
58+
' WHERE (spamfilter_wblist.rid=?) AND (spamfilter_wblist.email IN (%k)) AND (spamfilter_wblist.active="y")' .
5959
' ORDER BY spamfilter_wblist.priority DESC';
6060

6161
#
@@ -112,9 +112,10 @@ $policy_bank{'ORIGINATING'} = {
112112
# Allow SMTP access from IPs in @inet_acl to amvisd SMTP Port
113113
@inet_acl = qw( 127.0.0.1 [::1] 192.168.0.0/16 );
114114

115-
$signed_header_fields{'received'} = 0; # turn off signing of Received
115+
# DKIM
116116
$enable_dkim_verification = 1;
117-
$enable_dkim_signing = 1;
117+
$enable_dkim_signing = 1; # load DKIM signing code
118+
$signed_header_fields{'received'} = 0; # turn off signing of Received
118119
@dkim_signature_options_bysender_maps = (
119120
{ '.' => { ttl => 21*24*3600, c => 'relaxed/simple' } } );
120121

interface/lib/classes/aps_guicontroller.inc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,8 @@ public function createPackageInstance($settings, $packageid)
408408

409409
//* Set package status to install afetr we inserted the settings
410410
$app->db->datalogUpdate('aps_instances', array("instance_status" => INSTANCE_INSTALL), 'id', $InstanceID);
411+
412+
return $InstanceID;
411413
}
412414

413415
/**

server/plugins-available/backup_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function backup_action($action_name, $data) {
7070

7171
$app->uses('ini_parser,file,getconf,system');
7272

73-
$web = $app->dbmaster->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $backup['parent_domain_id']);
73+
$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $backup['parent_domain_id']);
7474
$server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
7575
$backup_dir = trim($server_config['backup_dir']);
7676
if($backup_dir == '') return;

server/plugins-available/cron_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ function _write_crontab() {
237237

238238
$command .= "\t{$this->parent_domain['system_user']}"; //* running as user
239239
if($job['type'] == 'url') {
240-
$command .= "\t{$cron_config['wget']} --user-agent='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0' -q -t 1 -T 7200 -O " . $log_wget_target . " " . escapeshellarg($job['command']) . " " . $log_target;
240+
$command .= "\t{$cron_config['wget']} --no-check-certificate --user-agent='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0' -q -t 1 -T 7200 -O " . $log_wget_target . " " . escapeshellarg($job['command']) . " " . $log_target;
241241
} else {
242242
if(strpos($job['command'], "\n") !== false || strpos($job['command'], "\r") !== false || strpos($job['command'], chr(0)) !== false) {
243243
$app->log("Insecure Cron job SKIPPED: " . $job['command'], LOGLEVEL_WARN);

server/plugins-available/nginx_plugin.inc.php

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,8 +1779,19 @@ function update($event_name, $data) {
17791779
$tpl->setLoop('alias_seo_redirects', $alias_seo_redirects);
17801780
}
17811781

1782+
$stats_web_folder = 'web';
1783+
if($data['new']['type'] == 'vhost'){
1784+
if($data['new']['web_folder'] != ''){
1785+
if(substr($data['new']['web_folder'], 0, 1) == '/') $data['new']['web_folder'] = substr($data['new']['web_folder'],1);
1786+
if(substr($data['new']['web_folder'], -1) == '/') $data['new']['web_folder'] = substr($data['new']['web_folder'],0,-1);
1787+
}
1788+
$stats_web_folder .= '/'.$data['new']['web_folder'];
1789+
} elseif($data['new']['type'] == 'vhostsubdomain' || $data['new']['type'] == 'vhostalias') {
1790+
$stats_web_folder = $data['new']['web_folder'];
1791+
}
1792+
17821793
//* Create basic http auth for website statistics
1783-
$tpl->setVar('stats_auth_passwd_file', $data['new']['document_root']."/web/stats/.htpasswd_stats");
1794+
$tpl->setVar('stats_auth_passwd_file', $data['new']['document_root']."/" . $stats_web_folder . "/stats/.htpasswd_stats");
17841795

17851796
// Create basic http auth for other directories
17861797
$basic_auth_locations = $this->_create_web_folder_auth_configuration($data['new']);
@@ -1848,11 +1859,11 @@ function update($event_name, $data) {
18481859
}
18491860

18501861
// create password file for stats directory
1851-
if(!is_file($data['new']['document_root'].'/web/stats/.htpasswd_stats') || $data['new']['stats_password'] != $data['old']['stats_password']) {
1862+
if(!is_file($data['new']['document_root'].'/' . $stats_web_folder . '/stats/.htpasswd_stats') || $data['new']['stats_password'] != $data['old']['stats_password']) {
18521863
if(trim($data['new']['stats_password']) != '') {
18531864
$htp_file = 'admin:'.trim($data['new']['stats_password']);
1854-
$app->system->file_put_contents($data['new']['document_root'].'/web/stats/.htpasswd_stats', $htp_file);
1855-
$app->system->chmod($data['new']['document_root'].'/web/stats/.htpasswd_stats', 0755);
1865+
$app->system->file_put_contents($data['new']['document_root'].'/' . $stats_web_folder . '/stats/.htpasswd_stats', $htp_file);
1866+
$app->system->chmod($data['new']['document_root'].'/' . $stats_web_folder . '/stats/.htpasswd_stats', 0755);
18561867
unset($htp_file);
18571868
}
18581869
}

0 commit comments

Comments
 (0)