Skip to content

Commit 329b30d

Browse files
author
Till Brehm
committed
Merge branch '3.2.11p2-fixes' into 'develop'
3.2.11p2 fixes Closes #6643, #6593, #6644, #6641, #6633, #6640, and #6642 See merge request ispconfig/ispconfig3!1849
2 parents cbc55bc + bb5020e commit 329b30d

File tree

7 files changed

+76
-66
lines changed

7 files changed

+76
-66
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ALTER TABLE `spamfilter_policy`
2+
CHANGE `warnvirusrecip` `warnvirusrecip` VARCHAR(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT 'N',
3+
CHANGE `warnbannedrecip` `warnbannedrecip` VARCHAR(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT 'N',
4+
CHANGE `warnbadhrecip` `warnbadhrecip` VARCHAR(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT 'N';
5+
ALTER TABLE `sys_ini` CHANGE `default_logo` `default_logo` TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL;
6+
ALTER TABLE `sys_ini` CHANGE `custom_logo` `custom_logo` TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL;

install/sql/ispconfig3.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,9 +1532,9 @@ CREATE TABLE `spamfilter_policy` (
15321532
`addr_extension_spam` varchar(64) default NULL,
15331533
`addr_extension_banned` varchar(64) default NULL,
15341534
`addr_extension_bad_header` varchar(64) default NULL,
1535-
`warnvirusrecip` enum('N','Y') default 'N',
1536-
`warnbannedrecip` enum('N','Y') default 'N',
1537-
`warnbadhrecip` enum('N','Y') default 'N',
1535+
`warnvirusrecip` VARCHAR(1) NULL default 'N',
1536+
`warnbannedrecip` VARCHAR(1) NULL default 'N',
1537+
`warnbadhrecip` VARCHAR(1) NULL default 'N',
15381538
`newvirus_admin` varchar(64) default NULL,
15391539
`virus_admin` varchar(64) default NULL,
15401540
`banned_admin` varchar(64) default NULL,
@@ -1741,8 +1741,8 @@ CREATE TABLE `sys_group` (
17411741
CREATE TABLE `sys_ini` (
17421742
`sysini_id` int(11) unsigned NOT NULL auto_increment,
17431743
`config` longtext,
1744-
`default_logo` text NOT NULL,
1745-
`custom_logo` text NOT NULL,
1744+
`default_logo` text NULL,
1745+
`custom_logo` text NULL,
17461746
PRIMARY KEY (`sysini_id`)
17471747
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
17481748

interface/web/dns/form/dns_caa.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
'type' => 'TOLOWER')
5252
),
5353
'validators' => array ( 0 => array ( 'type' => 'REGEX',
54-
'regex' => '/^[a-zA-Z0-9\.\-\_]{0,255}$/',
54+
'regex' => '/^[a-zA-Z0-9\.\-\_\*]{0,255}$/',
5555
'errmsg'=> 'name_error_regex'),
5656
),
5757
'default' => '',

interface/web/mail/ajax_get_json.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@
3434
//* Check permissions for module
3535
$app->auth->check_module_permissions('mail');
3636

37+
$app->uses('functions');
38+
3739
$type = $_GET['type'];
38-
$domain_id = $_GET['domain_id'];
40+
$domain_id = $app->functions->idn_encode($_GET['domain_id']);
3941

4042
if($type == 'create_dkim' && $domain_id != ''){
4143
$dkim_public = $_GET['dkim_public'];

interface/web/mailuser/templates/mail_user_filter_list.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h1><tmpl_var name="list_head_txt"></h1>
2121
<tr>
2222
<td><input class="form-control" type="text" name="search_rulename" value="{tmpl_var name='search_rulename'}" /></td>
2323
<td class="text-right">
24-
<button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="mail/mail_user_edit.php"><span class="icon icon-filter"></span></button>
24+
<button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="mailuser/mail_user_filter_list.php"><span class="icon icon-filter"></span></button>
2525
</td>
2626
</tr>
2727
</thead>

server/plugins-available/cron_jailkit_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ function delete($event_name, $data) {
229229

230230
function _setup_jailkit_chroot()
231231
{
232-
global $app;
232+
global $app, $conf;
233233

234234
if (isset($this->jailkit_config) && isset($this->jailkit_config['jailkit_hardlinks'])) {
235235
if ($this->jailkit_config['jailkit_hardlinks'] == 'yes') {
@@ -293,7 +293,7 @@ function _setup_jailkit_chroot()
293293
$programs = $this->jailkit_config['jailkit_chroot_app_programs'] . ' '
294294
. $this->jailkit_config['jailkit_chroot_cron_programs'];
295295

296-
if ($update_hash == $parent_domain['last_jailkit_hash']) {
296+
if ($update_hash == $this->parent_domain['last_jailkit_hash']) {
297297
return;
298298
}
299299

server/plugins-available/rspamd_plugin.inc.php

Lines changed: 58 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -282,74 +282,76 @@ function user_settings_update($event_name, $data, $internal = false) {
282282
$app->system->mkdirpath($this->users_config_dir);
283283
}
284284

285-
if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || !isset($data['new']['policy_id']) || intval($data['new']['policy_id']) == 0 && $type == 'spamfilter_user') {
286-
if(is_file($settings_file)) {
287-
unlink($settings_file);
288-
}
289-
} else {
290-
291-
$app->load('tpl');
292-
293-
$tpl = new tpl();
294-
if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_users.inc.conf.master")) {
295-
$tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_users.inc.conf.master");
285+
if ($type == 'spamfilter_user'){
286+
if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || !isset($data['new']['policy_id']) || intval($data['new']['policy_id']) == 0) {
287+
if(is_file($settings_file)) {
288+
unlink($settings_file);
289+
}
296290
} else {
297-
$tpl->newTemplate("rspamd_users.inc.conf.master");
298-
}
299291

300-
$tpl->setVar('record_identifier', 'ispc_' . $type . '_' . $entry_id);
301-
$tpl->setVar('priority', $settings_priority);
292+
$app->load('tpl');
302293

303-
if($type === 'spamfilter_user') {
304-
if($data[$use_data]['local'] === 'Y') {
305-
$tpl->setVar('to_email', $app->functions->idn_encode($email_address));
294+
$tpl = new tpl();
295+
if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_users.inc.conf.master")) {
296+
$tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_users.inc.conf.master");
306297
} else {
307-
$tpl->setVar('from_email', $app->functions->idn_encode($email_address));
298+
$tpl->newTemplate("rspamd_users.inc.conf.master");
308299
}
309-
// unneded? $spamfilter appears unused
310-
$spamfilter = $data[$use_data];
311-
} else {
312-
$tpl->setVar('to_email', $app->functions->idn_encode($email_address));
313300

314-
// need to get matching spamfilter user if any
315-
// unneded? $spamfilter appears unused
316-
$spamfilter = $app->db->queryOneRecord('SELECT * FROM spamfilter_users WHERE `email` = ?', $email_address);
317-
}
301+
$tpl->setVar('record_identifier', 'ispc_' . $type . '_' . $entry_id);
302+
$tpl->setVar('priority', $settings_priority);
303+
304+
if($type === 'spamfilter_user') {
305+
if($data[$use_data]['local'] === 'Y') {
306+
$tpl->setVar('to_email', $app->functions->idn_encode($email_address));
307+
} else {
308+
$tpl->setVar('from_email', $app->functions->idn_encode($email_address));
309+
}
310+
// unneded? $spamfilter appears unused
311+
$spamfilter = $data[$use_data];
312+
} else {
313+
$tpl->setVar('to_email', $app->functions->idn_encode($email_address));
318314

319-
if(!isset($policy['rspamd_spam_tag_level'])) {
320-
$policy['rspamd_spam_tag_level'] = 6.0;
321-
}
322-
if(!isset($policy['rspamd_spam_tag_method'])) {
323-
$policy['rspamd_spam_tag_method'] = 'add_header';
324-
}
325-
if(!isset($policy['rspamd_spam_kill_level'])) {
326-
$policy['rspamd_spam_kill_level'] = 15.0;
327-
}
328-
if(!isset($policy['rspamd_virus_kill_level'])) {
329-
$policy['rspamd_virus_kill_level'] = floatval($policy['rspamd_spam_kill_level']) + 1000;
330-
}
315+
// need to get matching spamfilter user if any
316+
// unneded? $spamfilter appears unused
317+
$spamfilter = $app->db->queryOneRecord('SELECT * FROM spamfilter_users WHERE `email` = ?', $email_address);
318+
}
331319

332-
$tpl->setVar('rspamd_spam_tag_level', floatval($policy['rspamd_spam_tag_level']));
333-
$tpl->setVar('rspamd_spam_tag_method', $policy['rspamd_spam_tag_method']);
334-
$tpl->setVar('rspamd_spam_kill_level', floatval($policy['rspamd_spam_kill_level']));
335-
$tpl->setVar('rspamd_virus_kill_level', floatval($policy['rspamd_spam_kill_level']) + 1000);
320+
if(!isset($policy['rspamd_spam_tag_level'])) {
321+
$policy['rspamd_spam_tag_level'] = 6.0;
322+
}
323+
if(!isset($policy['rspamd_spam_tag_method'])) {
324+
$policy['rspamd_spam_tag_method'] = 'add_header';
325+
}
326+
if(!isset($policy['rspamd_spam_kill_level'])) {
327+
$policy['rspamd_spam_kill_level'] = 15.0;
328+
}
329+
if(!isset($policy['rspamd_virus_kill_level'])) {
330+
$policy['rspamd_virus_kill_level'] = floatval($policy['rspamd_spam_kill_level']) + 1000;
331+
}
336332

337-
if(isset($policy['spam_lover']) && $policy['spam_lover'] == 'Y') {
338-
$tpl->setVar('spam_lover', true);
339-
}
340-
if(isset($policy['virus_lover']) && $policy['virus_lover'] == 'Y') {
341-
$tpl->setVar('virus_lover', true);
342-
}
333+
$tpl->setVar('rspamd_spam_tag_level', floatval($policy['rspamd_spam_tag_level']));
334+
$tpl->setVar('rspamd_spam_tag_method', $policy['rspamd_spam_tag_method']);
335+
$tpl->setVar('rspamd_spam_kill_level', floatval($policy['rspamd_spam_kill_level']));
336+
$tpl->setVar('rspamd_virus_kill_level', floatval($policy['rspamd_spam_kill_level']) + 1000);
343337

344-
$tpl->setVar('greylisting', $greylisting);
338+
if(isset($policy['spam_lover']) && $policy['spam_lover'] == 'Y') {
339+
$tpl->setVar('spam_lover', true);
340+
}
341+
if(isset($policy['virus_lover']) && $policy['virus_lover'] == 'Y') {
342+
$tpl->setVar('virus_lover', true);
343+
}
345344

346-
if(isset($policy['rspamd_spam_greylisting_level'])) {
347-
$tpl->setVar('greylisting_level', floatval($policy['rspamd_spam_greylisting_level']));
348-
} else {
349-
$tpl->setVar('greylisting_level', 0.1);
350-
}
345+
$tpl->setVar('greylisting', $greylisting);
351346

352-
$app->system->file_put_contents($settings_file, $tpl->grab());
347+
if(isset($policy['rspamd_spam_greylisting_level'])) {
348+
$tpl->setVar('greylisting_level', floatval($policy['rspamd_spam_greylisting_level']));
349+
} else {
350+
$tpl->setVar('greylisting_level', 0.1);
351+
}
352+
353+
$app->system->file_put_contents($settings_file, $tpl->grab());
354+
}
353355
}
354356
}
355357

0 commit comments

Comments
 (0)