Skip to content

Commit 632dd86

Browse files
author
Till Brehm
committed
Merge branch 'minor-security-glitches' into 'master'
Fixed NameVirtualHost-Info, Normalized Welcome Messages and removed Version infos Warning: I think Apache will currently not listen to custom port numbers set in IPs. This is confirmed on my test environment! This issue also exists in current 3.1 release! (Will open an issue) See merge request !503
2 parents ea5a319 + 05e1637 commit 632dd86

11 files changed

+21
-6
lines changed

install/lib/installer_base.lib.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,9 @@ public function configure_pureftpd() {
15511551
}
15521552

15531553
if(!is_file('/etc/pure-ftpd/conf/DontResolve')) exec('echo "yes" > /etc/pure-ftpd/conf/DontResolve');
1554+
1555+
if(!is_file('/etc/pure-ftpd/welcome.msg')) exec('echo "FTP managed by ISPConfig" > /etc/pure-ftpd/welcome.msg');
1556+
if(!is_file('/etc/pure-ftpd/conf/FortunesFile')) exec('echo "/etc/pure-ftpd/welcome.msg" > /etc/pure-ftpd/conf/FortunesFile');
15541557
}
15551558

15561559
public function configure_mydns() {

install/tpl/apache_ispconfig.conf.master

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
################################################
2+
# ISPConfig General Apache Options
3+
################################################
4+
ServerTokens ProductOnly
5+
ServerSignature Off
6+
7+
18

29
################################################
310
# ISPConfig Logfile configuration for vlogger
@@ -130,9 +137,10 @@ Alias /.well-known/acme-challenge /usr/local/ispconfig/interface/acme/.well-know
130137
</tmpl_if>
131138
</Directory>
132139

140+
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
133141
NameVirtualHost *:80
134142
NameVirtualHost *:443
135143
<tmpl_loop name="ip_adresses">
136144
NameVirtualHost {tmpl_var name="ip_address"}:{tmpl_var name="port"}
137145
</tmpl_loop>
138-
146+
</tmpl_if>

install/tpl/apache_ispconfig.vhost.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
######################################################
55

66
<tmpl_var name="vhost_port_listen"> Listen <tmpl_var name="vhost_port">
7-
NameVirtualHost *:<tmpl_var name="vhost_port">
7+
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>NameVirtualHost *:<tmpl_var name="vhost_port"></tmpl_if>
88

99
<VirtualHost _default_:<tmpl_var name="vhost_port">>
1010
ServerAdmin webmaster@localhost

install/tpl/debian6_dovecot.conf.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ssl_key_file = /etc/postfix/smtpd.key
1818

1919
mail_privileged_group = mail
2020

21-
login_greeting = ISPConfig3 IMAP server ready...
21+
login_greeting = MailServer managed by ISPConfig
2222

2323
## IMAP specific settings
2424
protocol imap {

install/tpl/debian_dovecot.conf.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ ssl_key_file = /etc/postfix/smtpd.key
178178
#login_max_connections = 256
179179

180180
# Greeting message for clients.
181-
#login_greeting = Dovecot ready.
181+
login_greeting = MailServer managed by ISPConfig
182182

183183
# Space-separated list of elements we want to log. The elements which have
184184
# a non-empty variable value are joined together to form a comma-separated

install/tpl/debian_postfix.conf.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ smtpd_tls_protocols = !SSLv2,!SSLv3
4343
smtp_tls_protocols = !SSLv2,!SSLv3
4444
smtpd_tls_exclude_ciphers = RC4, aNULL
4545
smtp_tls_exclude_ciphers = RC4, aNULL
46+
smtpd_banner = MailServer managed by ISPConfig

install/tpl/fedora_dovecot.conf.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ ssl_key_file = /etc/postfix/smtpd.key
180180
#login_max_connections = 256
181181

182182
# Greeting message for clients.
183-
#login_greeting = Dovecot ready.
183+
login_greeting = MailServer managed by ISPConfig
184184

185185
# Space separated list of trusted network ranges. Connections from these
186186
# IPs are allowed to override their IP addresses and ports (for logging and

install/tpl/fedora_postfix.conf.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ smtpd_tls_protocols = !SSLv2,!SSLv3
4040
smtp_tls_protocols = !SSLv2,!SSLv3
4141
smtpd_tls_exclude_ciphers = RC4, aNULL
4242
smtp_tls_exclude_ciphers = RC4, aNULL
43+
smtpd_banner = MailServer managed by ISPConfig

install/tpl/gentoo_postfix.conf.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ smtpd_tls_protocols = !SSLv2,!SSLv3
3939
smtp_tls_protocols = !SSLv2,!SSLv3
4040
smtpd_tls_exclude_ciphers = RC4, aNULL
4141
smtp_tls_exclude_ciphers = RC4, aNULL
42+
smtpd_banner = MailServer managed by ISPConfig

install/tpl/opensuse_dovecot.conf.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ ssl_key_file = /etc/postfix/smtpd.key
187187
#login_max_connections = 256
188188

189189
# Greeting message for clients.
190-
#login_greeting = Dovecot ready.
190+
login_greeting = MailServer managed by ISPConfig
191191

192192
# Space separated list of trusted network ranges. Connections from these
193193
# IPs are allowed to override their IP addresses and ports (for logging and

0 commit comments

Comments
 (0)