Skip to content

Commit

Permalink
add missing use-statement for opcacheinfo page; ease ClientConnectRat…
Browse files Browse the repository at this point in the history
…e ban-filter for proftpd; allow null-mx entry in dns-editor, fixes #1263

Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Jul 27, 2024
1 parent 585b16d commit 75bc014
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions admin_opcacheinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
use Froxlor\FroxlorLogger;
use Froxlor\UI\HTML;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;

if ($action == 'reset' && function_exists('opcache_reset') && $userinfo['change_serversettings'] == '1') {
Expand Down
6 changes: 5 additions & 1 deletion lib/Froxlor/Api/Commands/DomainZones.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function add()
// remove it for checks
$content = substr($content, 0, -1);
}
if (!Validate::validateDomain($content)) {
if (!empty($content) && !Validate::validateDomain($content)) {
$errors[] = lng('error.dns_mx_needdom');
} else {
// check whether there is a CNAME-record for the same resource
Expand All @@ -244,6 +244,10 @@ public function add()
}
// append trailing dot (again)
$content .= '.';
// if content is only ".", the prio needs to be 0 which results in a "null mx" entry
if ($content == '.' && $prio != 0) {
$prio = 0;
}
} elseif ($type == 'NS') {
// check for trailing dot
if (substr($content, -1) == '.') {
Expand Down
2 changes: 1 addition & 1 deletion lib/configfiles/bookworm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3093,7 +3093,7 @@ MaxLoginAttempts 3
BanLog /var/log/proftpd/ban.log
BanTable /etc/proftpd/ban.tab
BanMessage "User %u was banned."
BanOnEvent ClientConnectRate 5/00:00:02 12:00:00 "Stop connecting frequently"
BanOnEvent ClientConnectRate 10/00:00:02 02:00:00 "Stop connecting frequently"
BanOnEvent MaxLoginAttempts 3/00:30:00 12:00:00
BanOnEvent AnonRejectPasswords 1/01:00:00 99:99:99
BanControlsACLs all allow user root
Expand Down
2 changes: 1 addition & 1 deletion lib/configfiles/bullseye.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4661,7 +4661,7 @@ MaxLoginAttempts 3
BanLog /var/log/proftpd/ban.log
BanTable /etc/proftpd/ban.tab
BanMessage "User %u was banned."
BanOnEvent ClientConnectRate 5/00:00:02 12:00:00 "Stop connecting frequently"
BanOnEvent ClientConnectRate 10/00:00:02 02:00:00 "Stop connecting frequently"
BanOnEvent MaxLoginAttempts 3/00:30:00 12:00:00
BanOnEvent AnonRejectPasswords 1/01:00:00 99:99:99
BanControlsACLs all allow user root
Expand Down
2 changes: 1 addition & 1 deletion lib/configfiles/focal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3880,7 +3880,7 @@ MaxLoginAttempts 3
BanLog /var/log/proftpd/ban.log
BanTable /etc/proftpd/ban.tab
BanMessage "User %u was banned."
BanOnEvent ClientConnectRate 5/00:00:02 12:00:00 "Stop connecting frequently"
BanOnEvent ClientConnectRate 10/00:00:02 02:00:00 "Stop connecting frequently"
BanOnEvent MaxLoginAttempts 3/00:30:00 12:00:00
BanOnEvent AnonRejectPasswords 1/01:00:00 99:99:99
BanControlsACLs all allow user root
Expand Down
2 changes: 1 addition & 1 deletion lib/configfiles/jammy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3872,7 +3872,7 @@ MaxLoginAttempts 3
BanLog /var/log/proftpd/ban.log
BanTable /etc/proftpd/ban.tab
BanMessage "User %u was banned."
BanOnEvent ClientConnectRate 5/00:00:02 12:00:00 "Stop connecting frequently"
BanOnEvent ClientConnectRate 10/00:00:02 02:00:00 "Stop connecting frequently"
BanOnEvent MaxLoginAttempts 3/00:30:00 12:00:00
BanOnEvent AnonRejectPasswords 1/01:00:00 99:99:99
BanControlsACLs all allow user root
Expand Down
2 changes: 1 addition & 1 deletion lib/configfiles/noble.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2547,7 +2547,7 @@ MaxLoginAttempts 3
BanLog /var/log/proftpd/ban.log
BanTable /etc/proftpd/ban.tab
BanMessage "User %u was banned."
BanOnEvent ClientConnectRate 5/00:00:02 12:00:00 "Stop connecting frequently"
BanOnEvent ClientConnectRate 10/00:00:02 02:00:00 "Stop connecting frequently"
BanOnEvent MaxLoginAttempts 3/00:30:00 12:00:00
BanOnEvent AnonRejectPasswords 1/01:00:00 99:99:99
BanControlsACLs all allow user root
Expand Down
2 changes: 1 addition & 1 deletion lng/de.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,7 @@
],
'documentroot_use_default_value' => [
'title' => 'Verwende Domainnamen im Documentroot',
'description' => 'Wenn aktiviert wird dem standard Documentroot zusätzlich der Domain-Name angehängt.<br /><br />Beispiel:<br />/var/customers/customer_name/example.tld/<br />/var/customers/customer_name/subdomain.example.tld/',
'description' => 'Wenn aktiviert wird dem standard Documentroot zusätzlich der Domain-Name angehängt.<br /><br />Beispiel:<br />/var/customers/webs/customer_name/example.tld/<br />/var/customers/webs/customer_name/subdomain.example.tld/',
],
'panel_phpconfigs_hidesubdomains' => [
'title' => 'Verstecke Subdomains in PHP-Konfigurations-Übersicht',
Expand Down
2 changes: 1 addition & 1 deletion lng/en.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -1946,7 +1946,7 @@
],
'documentroot_use_default_value' => [
'title' => 'Use domain name as default value for DocumentRoot path',
'description' => 'If enabled and DocumentRoot path is empty, default value will be the (sub)domain name.<br /><br />Examples: <br />/var/customers/customer_name/example.com/<br />/var/customers/customer_name/subdomain.example.com/',
'description' => 'If enabled and DocumentRoot path is empty, default value will be the (sub)domain name.<br /><br />Examples: <br />/var/customers/webs/customer_name/example.com/<br />/var/customers/webs/customer_name/subdomain.example.com/',
],
'panel_phpconfigs_hidesubdomains' => [
'title' => 'Hide subdomains in PHP-configuration overview',
Expand Down

0 comments on commit 75bc014

Please sign in to comment.