Skip to content

Commit f964bf7

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents 069b2fe + 62f5b70 commit f964bf7

File tree

9 files changed

+38
-141
lines changed

9 files changed

+38
-141
lines changed

install/lib/installer_base.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ public function find_installed_apps() {
172172
if(is_installed('squid')) $conf['squid']['installed'] = true;
173173
if(is_installed('nginx')) $conf['nginx']['installed'] = true;
174174
if(is_installed('iptables') && is_installed('ufw')) $conf['ufw']['installed'] = true;
175+
if(is_installed('iptables') && is_installed('bastille-netfilter')) $conf['firewall']['installed'] = true;
175176
if(is_installed('fail2ban-server')) $conf['fail2ban']['installed'] = true;
176177
if(is_installed('vzctl')) $conf['openvz']['installed'] = true;
177-
if(is_installed('iptables') && is_installed('bastille-netfilter')) $conf['bastille']['installed'] = true;
178178
if(is_installed('metronome') && is_installed('metronomectl')) $conf['xmpp']['installed'] = true;
179179
if(is_installed('spamassassin')) $conf['spamassassin']['installed'] = true;
180180
if(is_installed('vlogger')) $conf['vlogger']['installed'] = true;

install/tpl/nginx_apps.vhost.master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
server {
2-
listen {apps_vhost_ip};
3-
listen [::]:{apps_vhost_port};
2+
listen {apps_vhost_port};
3+
listen [::]:{apps_vhost_port} ipv6only=on;
44
ssl {ssl_on};
55
{ssl_comment}ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
66
{ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;

install/tpl/nginx_ispconfig.vhost.master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
server {
22
listen {vhost_port};
3-
listen [::]:{vhost_port}
3+
listen [::]:{vhost_port} ipv6only=on;
44
ssl {ssl_on};
55
{ssl_comment}ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
66
{ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
@@ -81,4 +81,4 @@ server {
8181
# location /webmail {
8282
# rewrite ^/* /squirrelmail last;
8383
# }
84-
}
84+
}

interface/web/admin/form/server_config.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
'formtype' => 'TEXT',
171171
'default' => '/var/backup',
172172
'validators' => array( 0 => array ( 'type' => 'REGEX',
173-
'regex' => '/^\/[a-zA-Z0-9\.\-\_\/]{5,128}$/',
173+
'regex' => "/(|^\\/{1,2}(?:[\\w-]+[.]?\\/?){5,128})$/",
174174
'errmsg'=> 'backup_dir_error_regex'),
175175
),
176176
'value' => '',

interface/web/dns/dns_import.php

Lines changed: 25 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,22 @@
215215
foreach($lines as $line){
216216
$line = trim($line);
217217
if ($line != '' && substr($line, 0, 1) != ';'){
218-
if(strpos($line, ";") !== FALSE) $line = substr($line, 0, strpos($line, ";"));
219-
if(strpos($line, "(") !== FALSE) $line = substr($line, 0, strpos($line, "("));
220-
if(strpos($line, ")") !== FALSE) $line = substr($line, 0, strpos($line, ")"));
218+
if(strpos($line, ";") !== FALSE) {
219+
if (!preg_match("/v=DKIM|v=DMARC/",$line)) {
220+
$line = substr($line, 0, strpos($line, ";"));
221+
}
222+
}
223+
if(strpos($line, "(") !== FALSE ) {
224+
if (!preg_match("/v=DKIM/",$line)) {
225+
$line = substr($line, 0, strpos($line, "("));
226+
}
227+
}
228+
if(strpos($line, ")") !== FALSE ) {
229+
if (!preg_match("/v=DKIM/",$line)) {
230+
$line = substr($line, 0, strpos($line, ")"));
231+
}
232+
}
233+
221234
$line = trim($line);
222235
if ($line != ''){
223236
$sPattern = '/\s+/m';
@@ -253,10 +266,17 @@
253266

254267
$parts = explode(' ', $line);
255268

256-
// make all elements lowercase
269+
// make elements lowercase
270+
$dkim=@($parts[3]=='"v=DKIM1;')?true:false;
271+
$dmarc=@($parts[3]=='"v=DMARC1;')?true:false;
272+
257273
$new_parts = array();
258274
foreach($parts as $part){
259-
$new_parts[] = strtolower($part);
275+
if(!$dkim && !$dmarc) {
276+
$new_parts[] = strtolower($part);
277+
} else {
278+
$new_parts[] = $part;
279+
}
260280
}
261281
unset($parts);
262282
$parts = $new_parts;
@@ -557,130 +577,6 @@
557577
$i++;
558578
}
559579

560-
/*
561-
$i = 0;
562-
$r = 0;
563-
$s = 0;
564-
$dns_rr = array();
565-
foreach ($lines as $line)
566-
{
567-
$line = trim($line);
568-
if ($line != '' && substr($line,0,1) != ';' && substr($line,0,1) != '$')
569-
{
570-
$line = str_replace("\n",NULL,$line);
571-
$i++;
572-
573-
// TODO - Find a better way to parse the SOA record. Lazy checking.
574-
if ($i <= 7)
575-
{
576-
if ($i > 1)
577-
{
578-
$s++;
579-
$line = str_replace("\t",NULL,$line);
580-
if (!empty($line))
581-
{
582-
print(strpos(";",$line));
583-
$line = substr($line,0,strpos($line,";"));
584-
if ($s == 1)
585-
$soa['serial'] = $line;
586-
else if ($s == 2)
587-
$soa['refresh'] = $line;
588-
else if ($s == 3)
589-
$soa['retry'] = $line;
590-
else if ($s == 4)
591-
$soa['expire'] = $line;
592-
else if ($s == 5)
593-
$soa['minimum'] = $line;
594-
595-
}
596-
}
597-
else
598-
{
599-
$line = str_replace("\t",",",$line);
600-
$line = str_replace(" ",",",$line);
601-
$recs = explode(",",$line);
602-
603-
foreach ($recs as $key => $rec)
604-
{
605-
$rec = trim($rec);
606-
if($rec == '') continue;
607-
//name type data aux ttl active
608-
if ($key == 0)
609-
{
610-
if ($rec == '@')
611-
{
612-
$rec = $name;
613-
}
614-
615-
$soa['name'] = $rec;
616-
}
617-
618-
if ($key != 0 && strtolower($rec) == 'soa')
619-
{
620-
$typekeys[$s] = $key;
621-
}
622-
else if ($key > $typekey[$r])
623-
{
624-
if ($rec != "" && $rec != "(")
625-
{
626-
$rec = explode(" ",$rec);
627-
628-
$soa['ns'] = $servers[0]['server_name'];
629-
$soa['mbox'] = $rec[1];
630-
}
631-
}
632-
}
633-
}
634-
}
635-
else
636-
{
637-
$line = str_replace("\n","",trim($line));
638-
639-
if (!empty($line))
640-
{
641-
642-
preg_match_all('/(.*?)\s*IN\s*(A|CNAME|MX|TXT|NS|AAAA)\s*(.*)/',$line, $recs);
643-
644-
if ($recs[1][0] == '@' || trim($recs[1][0]) == "")
645-
{
646-
$recs[1][0] = $name;
647-
}
648-
$dns_rr[$r]['name'] = $recs[1][0];
649-
$dns_rr[$r]['type'] = $recs[2][0];
650-
if (strtolower($dns_rr[$r]['type'])=='mx')
651-
{
652-
$recs[3][0] = str_replace(" ","\t",$recs[3][0]);
653-
$mx[$r] = explode("\t",$recs[3][0]);
654-
for ($m=1;$m<count($mx[$r]);$m++)
655-
{
656-
if (!empty($mx[$r][$m]))
657-
$dns_rr[$r]['data'] = $mx[$r][$m];
658-
}
659-
660-
$dns_rr[$r]['aux'] = $mx[$r][0];
661-
}
662-
else if (strtolower($dns_rr[$r]['type'])=='txt')
663-
{
664-
$dns_rr[$r]['data'] = substr($recs[3][0],1,(strlen($recs[3][0])-2));
665-
}
666-
else
667-
{
668-
$dns_rr[$r]['data'] = $recs[3][0];
669-
}
670-
671-
if (strtolower($dns_rr[$r]['type'])=='ns' && strtolower($dns_rr[$r]['name'])==$name)
672-
{
673-
unset($dns_rr[$r]);
674-
}
675-
676-
$r++;
677-
}
678-
}
679-
680-
}
681-
}
682-
*/
683-
684580
foreach ($servers as $server){
685581
$dns_rr[$r]['name'] = $soa['name'];
686582
$dns_rr[$r]['type'] = 'NS';

server/conf/nginx_apps.vhost.master

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ server {
106106
location /phpMyAdmin {
107107
rewrite ^/* /phpmyadmin last;
108108
}
109-
109+
110110
location /squirrelmail {
111111
root /usr/share/;
112112
index index.php index.html index.htm;
@@ -164,7 +164,6 @@ server {
164164
fastcgi_param CONTENT_TYPE $content_type;
165165
fastcgi_param CONTENT_LENGTH $content_length;
166166

167-
fastcgi_param SCRIPT_FILENAME $request_filename;
168167
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
169168
fastcgi_param REQUEST_URI $request_uri;
170169
fastcgi_param DOCUMENT_URI $document_uri;
@@ -199,4 +198,4 @@ server {
199198
alias /var/lib/mailman/archives/public;
200199
autoindex on;
201200
}
202-
}
201+
}

server/conf/php_fpm_pool.conf.master

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ env[TEMP] = <tmpl_var name='document_root'>/tmp
3434

3535
<tmpl_if name='security_level' op='==' value='20'>
3636
<tmpl_var name='enable_php_open_basedir'>php_admin_value[open_basedir] = <tmpl_var name='php_open_basedir'>
37-
<tmpl_if name='custom_session_save_path' op='!=' value='y'>php_admin_value[session.save_path] = <tmpl_var name='document_root'>/tmp</tmpl_if>
37+
<tmpl_if name='custom_session_save_path' op='!=' value='y'>
38+
php_admin_value[session.save_path] = <tmpl_var name='document_root'>/tmp
39+
</tmpl_if>
3840
php_admin_value[upload_tmp_dir] = <tmpl_var name='document_root'>/tmp
3941
php_admin_value[sendmail_path] = "/usr/sbin/sendmail -t -i -f webmaster@<tmpl_var name='domain'>"
4042
</tmpl_if>

server/scripts/update_from_dev.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
exit 1
1111
}
1212

13-
wget -O ispconfig3-dev.tar.gz "http://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=master"
13+
wget -O ispconfig3-dev.tar.gz "https://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=master"
1414
tar xzf ispconfig3-dev.tar.gz
1515

1616
echo -n "Latest git version: "

server/scripts/update_from_dev_stable.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
exit 1
1111
}
1212

13-
wget -O ispconfig3-dev.tar.gz "http://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=stable-3.1"
13+
wget -O ispconfig3-dev.tar.gz "https://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=stable-3.1"
1414
tar xzf ispconfig3-dev.tar.gz
1515

1616
echo -n "Latest git version: "

0 commit comments

Comments
 (0)