Skip to content

Commit 50ea5b3

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents 76232bb + a02ec6b commit 50ea5b3

File tree

119 files changed

+485
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+485
-163
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--- amavisd-new.orig 2017-11-16 11:51:19.000000000 +0100
2+
+++ amavisd-new 2018-05-25 16:53:45.623398108 +0200
3+
@@ -22829,6 +22829,7 @@
4+
}
5+
# load policy banks from the 'client_ipaddr_policy' lookup
6+
Amavis::load_policy_bank($_,$msginfo) for @bank_names_cl;
7+
+ $msginfo->originating(c('originating'));
8+
9+
$msginfo->client_addr($cl_ip); # ADDR
10+
$msginfo->client_port($cl_port); # PORT
11+
@@ -34361,6 +34362,7 @@
12+
$sig_ind++;
13+
}
14+
Amavis::load_policy_bank($_,$msginfo) for @bank_names;
15+
+ $msginfo->originating(c('originating'));
16+
$msginfo->dkim_signatures_valid(\@signatures_valid) if @signatures_valid;
17+
# if (ll(5) && $sig_ind > 0) {
18+
# # show which header fields are covered by which signature

install/lib/installer_base.lib.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2371,9 +2371,9 @@ public function configure_apps_vhost() {
23712371
$content = str_replace('{ssl_comment}', '#', $content);
23722372

23732373
// Fix socket path on PHP 7 systems
2374-
if(file_exists('/var/run/php/php7.0-fpm.sock')) {
2375-
$content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content);
2376-
}
2374+
if(file_exists('/var/run/php/php7.0-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content);
2375+
if(file_exists('/var/run/php/php7.1-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.1-fpm.sock', $content);
2376+
if(file_exists('/var/run/php/php7.2-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.2-fpm.sock', $content);
23772377

23782378
wf($vhost_conf_dir.'/apps.vhost', $content);
23792379

install/tpl/server.ini.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ php_fpm_ini_path=/etc/php5/fpm/php.ini
103103
php_fpm_pool_dir=/etc/php5/fpm/pool.d
104104
php_fpm_start_port=9010
105105
php_fpm_socket_dir=/var/lib/php5-fpm
106+
php_default_name=Default
106107
set_folder_permissions_on_update=n
107108
add_web_users_to_sshusers_group=y
108109
connect_userid_to_webid=n

interface/lib/classes/functions.inc.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,29 @@ public function htmlentities($value) {
513513

514514
return $out;
515515
}
516+
517+
// Function to check paths before we use it as include. Use with absolute paths only.
518+
public function check_include_path($path) {
519+
if(strpos($path,'//') !== false) die('Include path seems to be an URL: '.$this->htmlentities($path));
520+
if(strpos($path,'..') !== false) die('Two dots are not allowed in include path: '.$this->htmlentities($path));
521+
if(!preg_match("/^[a-zA-Z0-9_\/\.\-]+$/", $path)) die('Wrong chars in include path: '.$this->htmlentities($path));
522+
$path = realpath($path);
523+
if($path == '') die('Include path does not exist.');
524+
if(substr($path,0,strlen(ISPC_ROOT_PATH)) != ISPC_ROOT_PATH) die('Path '.$this->htmlentities($path).' is outside of ISPConfig installation directory.');
525+
return $path;
526+
}
527+
528+
// Function to check language strings
529+
public function check_language($language) {
530+
global $app;
531+
if(preg_match('/^[a-z]{2}$/',$language)) {
532+
return $language;
533+
} else {
534+
$app->log('Wrong language string: '.$this->htmlentities($language),1);
535+
return 'en';
536+
}
537+
}
538+
516539
}
517540

518541
?>

interface/lib/classes/listform.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function loadListDef($file, $module = '')
6060
}
6161

6262
//* Set local Language File
63-
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_'.$this->listDef['name'].'_list.lng';
63+
$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_'.$this->listDef['name'].'_list.lng';
6464
if(!file_exists($lng_file)) $lng_file = 'lib/lang/en_'.$this->listDef['name'].'_list.lng';
6565
include $lng_file;
6666

interface/lib/classes/listform_actions.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public function onShow()
249249
global $app;
250250

251251
//* Set global Language File
252-
$lng_file = ISPC_LIB_PATH.'/lang/'.$_SESSION['s']['language'].'.lng';
252+
$lng_file = ISPC_LIB_PATH.'/lang/'.$app->functions->check_language($_SESSION['s']['language']).'.lng';
253253
if(!file_exists($lng_file))
254254
$lng_file = ISPC_LIB_PATH.'/lang/en.lng';
255255
include $lng_file;

interface/lib/classes/listform_tpl_generator.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ function buildHTML($listDef, $module = '') {
153153
}
154154

155155
function lng_add($lang, $listDef, $module = '') {
156-
global $go_api, $go_info, $conf;
156+
global $app, $conf;
157157

158158
if($module == '') {
159-
$lng_file = "lib/lang/".$conf["language"]."_".$listDef['name']."_list.lng";
159+
$lng_file = "lib/lang/".$app->functions->check_language($conf["language"])."_".$listDef['name']."_list.lng";
160160
} else {
161161
$lng_file = '../'.$module."/lib/lang/en_".$listDef['name']."_list.lng";
162162
}

interface/lib/classes/plugin_backuplist.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function onShow() {
4545
$listTpl->newTemplate('templates/web_backup_list.htm');
4646

4747
//* Loading language file
48-
$lng_file = "lib/lang/".$_SESSION["s"]["language"]."_web_backup_list.lng";
48+
$lng_file = "lib/lang/".$app->functions->check_language($_SESSION["s"]["language"])."_web_backup_list.lng";
4949
include $lng_file;
5050
$listTpl->setVar($wb);
5151

interface/lib/classes/plugin_backuplist_mail.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function onShow() {
4646
$listTpl->newTemplate('templates/mail_user_backup_list.htm');
4747

4848
//* Loading language file
49-
$lng_file = "lib/lang/".$_SESSION["s"]["language"]."_mail_backup_list.lng";
49+
$lng_file = "lib/lang/".$app->functions->check_language($_SESSION["s"]["language"])."_mail_backup_list.lng";
5050
include($lng_file);
5151
$listTpl->setVar($wb);
5252

interface/lib/classes/plugin_directive_snippets.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function onShow()
1818
$listTpl->newTemplate('templates/web_directive_snippets.htm');
1919

2020
//* Loading language file
21-
$lng_file = "lib/lang/".$_SESSION["s"]["language"]."_web_directive_snippets.lng";
21+
$lng_file = "lib/lang/".$app->functions->check_language($_SESSION["s"]["language"])."_web_directive_snippets.lng";
2222

2323
include $lng_file;
2424
$listTpl->setVar($wb);

0 commit comments

Comments
 (0)