Merge branch 'main' of github.com:Froxlor/Froxlor

This commit is contained in:
envoyr
2022-11-01 13:56:05 +01:00
25 changed files with 216 additions and 43 deletions

View File

@@ -37,6 +37,9 @@ if ($page == 'overview' || $page == 'customers') {
try {
$context = Traffic::getCustomerStats($userinfo, $range);
} catch (Exception $e) {
if ($e->getCode() === 405) {
Response::dynamicError(lng('traffic.nocustomers'));
}
Response::dynamicError($e->getMessage());
}

View File

@@ -125,7 +125,7 @@ UI::view('user/dns-editor.html.twig', [
'listing' => Listing::format($collection, $dns_list_data, 'dns_list', ['domain_id' => $domain_id]),
'actions_links' => [
[
'class' => 'btn-secondary',
'class' => 'btn-outline-secondary',
'href' => $linker->getLink([
'section' => 'domains',
'page' => 'domains',
@@ -136,7 +136,7 @@ UI::view('user/dns-editor.html.twig', [
'icon' => 'fa-solid fa-pen'
],
[
'class' => 'btn-secondary',
'class' => 'btn-outline-primary',
'href' => $linker->getLink(['section' => 'domains', 'page' => 'domains']),
'label' => lng('menue.domains.domains'),
'icon' => 'fa-solid fa-globe'

View File

@@ -120,7 +120,6 @@ if ($action == '2fa_entercode') {
]);
exit();
} elseif ($action == 'login') {
$languages = Language::getLanguages();
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$loginname = Validate::validate($_POST['loginname'], 'loginname');
$password = Validate::validate($_POST['password'], 'password');
@@ -358,7 +357,11 @@ if ($action == '2fa_entercode') {
break;
case 4:
$cmail = isset($_GET['customermail']) ? $_GET['customermail'] : 'unknown';
$message = str_replace('%s', $cmail, lng('error.errorsendingmail'));
if (!Validate::validateEmail($cmail)) {
$message = lng('error.errorsendingmail', ['invalid.address']);
} else {
$message = lng('error.errorsendingmail', [$cmail]);
}
break;
case 5:
$message = lng('error.user_banned');

View File

@@ -42,7 +42,7 @@ CREATE TABLE `ftp_users` (
`username` varchar(255) NOT NULL,
`uid` int(5) NOT NULL default '0',
`gid` int(5) NOT NULL default '0',
`password` varchar(128) NOT NULL,
`password` varchar(255) NOT NULL,
`homedir` varchar(255) NOT NULL default '',
`shell` varchar(255) NOT NULL default '/bin/false',
`login_enabled` enum('N','Y') NOT NULL default 'N',
@@ -65,8 +65,8 @@ CREATE TABLE `mail_users` (
`id` int(11) NOT NULL auto_increment,
`email` varchar(255) NOT NULL default '',
`username` varchar(255) NOT NULL default '',
`password` varchar(128) NOT NULL default '',
`password_enc` varchar(128) NOT NULL default '',
`password` varchar(255) NOT NULL default '',
`password_enc` varchar(255) NOT NULL default '',
`uid` int(11) NOT NULL default '0',
`gid` int(11) NOT NULL default '0',
`homedir` varchar(255) NOT NULL default '',

View File

@@ -68,6 +68,11 @@ if (Froxlor::isFroxlorVersion('0.10.38')) {
Database::query($sql);
// new customer allowed_mysqlserver field
Database::query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `allowed_mysqlserver` varchar(500) NOT NULL default '[0]';");
// ftp_users adjustments
Database::query("ALTER TABLE `" . TABLE_FTP_USERS . "` CHANGE `password` varchar(255) NOT NULL default '';");
// mail_users adjustments
Database::query("ALTER TABLE `" . TABLE_MAIL_USERS . "` CHANGE `password` varchar(255) NOT NULL default '';");
Database::query("ALTER TABLE `" . TABLE_MAIL_USERS . "` CHANGE `password_enc` varchar(255) NOT NULL default '';");
Update::lastStepStatus(0);
Update::showUpdateStep("Checking for multiple mysql-servers to allow acccess to customers for existing databases");

View File

@@ -470,7 +470,7 @@ abstract class ApiCommand extends ApiParameter
*
* @param string $customer_hide_option
* optional, when called as customer, some options might be hidden due to the
* panel.customer_hide_options ettings
* panel.customer_hide_options settings
*
* @return array
* @throws Exception

View File

@@ -245,7 +245,7 @@ class Admins extends ApiCommand implements ResourceEntity
$ipaddress = $this->getParam('ipaddress', true, -1);
// validation
$name = Validate::validate($name, 'name', '', '', [], true);
$name = Validate::validate($name, 'name', Validate::REGEX_DESC_TEXT, '', [], true);
$idna_convert = new IdnaWrapper();
$email = $idna_convert->encode(Validate::validate($email, 'email', '', '', [], true));
$def_language = Validate::validate($def_language, 'default language', '', '', [], true);
@@ -581,7 +581,7 @@ class Admins extends ApiCommand implements ResourceEntity
}
// validation
$name = Validate::validate($name, 'name', '', '', [], true);
$name = Validate::validate($name, 'name', Validate::REGEX_DESC_TEXT, '', [], true);
$idna_convert = new IdnaWrapper();
$email = $idna_convert->encode(Validate::validate($email, 'email', '', '', [], true));
$def_language = Validate::validate($def_language, 'default language', '', '', [], true);

View File

@@ -361,12 +361,12 @@ class Customers extends ApiCommand implements ResourceEntity
}
// validation
$name = Validate::validate($name, 'name', '', '', [], true);
$firstname = Validate::validate($firstname, 'first name', '', '', [], true);
$company = Validate::validate($company, 'company', '', '', [], true);
$street = Validate::validate($street, 'street', '', '', [], true);
$name = Validate::validate($name, 'name', Validate::REGEX_DESC_TEXT, '', [], true);
$firstname = Validate::validate($firstname, 'first name', Validate::REGEX_DESC_TEXT, '', [], true);
$company = Validate::validate($company, 'company', Validate::REGEX_DESC_TEXT, '', [], true);
$street = Validate::validate($street, 'street', Validate::REGEX_DESC_TEXT, '', [], true);
$zipcode = Validate::validate($zipcode, 'zipcode', '/^[0-9 \-A-Z]*$/', '', [], true);
$city = Validate::validate($city, 'city', '', '', [], true);
$city = Validate::validate($city, 'city', Validate::REGEX_DESC_TEXT, '', [], true);
$phone = Validate::validate($phone, 'phone', '/^[0-9\- \+\(\)\/]*$/', '', [], true);
$fax = Validate::validate($fax, 'fax', '/^[0-9\- \+\(\)\/]*$/', '', [], true);
$idna_convert = new IdnaWrapper();
@@ -1080,12 +1080,12 @@ class Customers extends ApiCommand implements ResourceEntity
// validation
if ($this->isAdmin()) {
$idna_convert = new IdnaWrapper();
$name = Validate::validate($name, 'name', '', '', [], true);
$firstname = Validate::validate($firstname, 'first name', '', '', [], true);
$company = Validate::validate($company, 'company', '', '', [], true);
$street = Validate::validate($street, 'street', '', '', [], true);
$name = Validate::validate($name, 'name', Validate::REGEX_DESC_TEXT, '', [], true);
$firstname = Validate::validate($firstname, 'first name', Validate::REGEX_DESC_TEXT, '', [], true);
$company = Validate::validate($company, 'company', Validate::REGEX_DESC_TEXT, '', [], true);
$street = Validate::validate($street, 'street', Validate::REGEX_DESC_TEXT, '', [], true);
$zipcode = Validate::validate($zipcode, 'zipcode', '/^[0-9 \-A-Z]*$/', '', [], true);
$city = Validate::validate($city, 'city', '', '', [], true);
$city = Validate::validate($city, 'city', Validate::REGEX_DESC_TEXT, '', [], true);
$phone = Validate::validate($phone, 'phone', '/^[0-9\- \+\(\)\/]*$/', '', [], true);
$fax = Validate::validate($fax, 'fax', '/^[0-9\- \+\(\)\/]*$/', '', [], true);
$email = $idna_convert->encode(Validate::validate($email, 'email', '', '', [], true));

View File

@@ -131,7 +131,7 @@ class MysqlServer extends ApiCommand implements ResourceEntity
require Froxlor::getInstallDir() . "/lib/userdata.inc.php";
// le format
if (isset($sql['root_user']) && isset($sql['root_password']) &&!is_array($sql_root)) {
if (isset($sql['root_user']) && isset($sql['root_password']) && !is_array($sql_root)) {
$sql_root = array(
0 => array(
'caption' => 'Default',
@@ -377,7 +377,7 @@ class MysqlServer extends ApiCommand implements ResourceEntity
$mysql_ca = $this->getParam('mysql_ca', true, $result['ssl']['caFile'] ?? '');
$mysql_verifycert = $this->getBoolParam('mysql_verifycert', true, $result['ssl']['verifyServerCertificate'] ?? 0);
$privileged_user = $this->getParam('privileged_user', true, $result['user']);
$privileged_password = $this->getParam('privileged_password', true, $result['password']);
$privileged_password = $this->getParam('privileged_password', true, '');
$description = $this->getParam('description', true, $result['caption']);
$allow_all_customers = $this->getParam('allow_all_customers', true, 0);
$test_connection = $this->getParam('test_connection', true, 1);
@@ -397,6 +397,11 @@ class MysqlServer extends ApiCommand implements ResourceEntity
$privileged_password = Validate::validate($privileged_password, 'password', '', '', [], true);
$description = Validate::validate(trim($description), 'description', Validate::REGEX_DESC_TEXT, '', [], true);
// keep old password?
if (empty($privileged_password)) {
$privileged_password = $result['password'];
}
if ($mysql_host != $result['host']) {
// check whether the server is in use by any customer
$result_ms = $this->databasesOnServer(true, $dbserver);

View File

@@ -78,7 +78,7 @@ class TrafficCron extends FroxlorCron
// Fork failed
return 1;
}
} else {
} else if (!defined('CRON_NOFORK_FLAG')) {
if (extension_loaded('pcntl')) {
$msg = "PHP compiled with pcntl but pcntl_fork function is not available.";
} else {

View File

@@ -35,8 +35,13 @@ class Crypt
/**
* Generates a random password
*
* @param int $length optional, will be read from settings if not given
* @param bool $isSalt optional, default false, do not include special characters
*
* @return string
*/
public static function generatePassword(int $length = 0)
public static function generatePassword(int $length = 0, bool $isSalt = false)
{
$alpha_lower = 'abcdefghijklmnopqrstuvwxyz';
$alpha_upper = strtoupper($alpha_lower);
@@ -57,7 +62,7 @@ class Crypt
$pw .= mb_substr(self::specialShuffle($numeric), 0, $n);
}
if (Settings::Get('panel.password_special_char_required')) {
if (Settings::Get('panel.password_special_char_required') && !$isSalt) {
$pw .= mb_substr(self::specialShuffle($special), 0, $n);
}
@@ -208,23 +213,22 @@ class Crypt
* Password to be encrypted
* @param bool $htpasswd
* optional whether to generate a SHA1 password for directory protection
* @param bool $openssl
* optional generates $htpasswd like strings but for proftpd
*
* @return string encrypted password)
*
* 0 - default crypt (depends on system configuration)
* 1 - MD5 $1$
* 2 - BLOWFISH $2y$07$
* 3 - SHA-256 $5$ (default)
* 4 - SHA-512 $6$
* @param bool $ftpd
* optional generates sha256 password strings for proftpd/pureftpd
*
* @return string encrypted password
*/
public static function makeCryptPassword($password, $htpasswd = false, $openssl = false)
public static function makeCryptPassword(string $password, bool $htpasswd = false, bool $ftpd = false)
{
if ($htpasswd || $openssl) {
return '{SHA' . ($openssl ? '1' : '') . '}' . base64_encode(sha1($password, true));
if ($htpasswd || $ftpd) {
if ($ftpd) {
// sha256 compatible for proftpd and pure-ftpd
return crypt($password, '$5$' . self::generatePassword(16, true) . '$');
}
// sha1 hash for dir-protection
return '{SHA}' . base64_encode(sha1($password, true));
}
// crypt using the specified crypt-algorithm or system default
$algo = Settings::Get('system.passwordcryptfunc') !== null ? Settings::Get('system.passwordcryptfunc') : PASSWORD_DEFAULT;
return password_hash($password, $algo);
}

View File

@@ -4333,6 +4333,26 @@ TLSVerifyClient off
<!-- Pureftpd -->
<daemon name="pureftpd" title="PureFTPd">
<install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install>
<file name="/etc/pure-ftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash
[ -f /etc/ssl/private/pure-ftpd.pem ] || openssl req -x509 -nodes -days 7300 -newkey rsa:4096 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
openssl dhparam -out /etc/ssl/private/pure-ftpd-dhparams.pem 3072
chmod 0600 /etc/ssl/private/pure-ftpd.pem /etc/ssl/private/pure-ftpd-dhparams.pem
]]>
</content>
</file>
<commands index="1">
<command><![CDATA[/etc/pure-ftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/pure-ftpd/create-cert.sh]]></command>
</commands>
<file name="/etc/pure-ftpd/conf/TLS"
chown="root:0" chmod="0644">
<content><![CDATA[
1
]]>
</content>
</file>
<file name="/etc/pure-ftpd/conf/MinUID" chown="root:0"
chmod="0644">
<content><![CDATA[
@@ -4683,6 +4703,7 @@ aliases: files
<!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<install><![CDATA[apt-get install cron]]></install>
<command><![CDATA[/usr/bin/php <BASE_PATH>bin/froxlor-cli froxlor:cron --run-task 99]]></command>
<command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon>

View File

@@ -2972,6 +2972,26 @@ TLSVerifyClient off
<!-- Pureftpd -->
<daemon name="pureftpd" title="PureFTPd">
<install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install>
<file name="/etc/pure-ftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash
[ -f /etc/ssl/private/pure-ftpd.pem ] || openssl req -x509 -nodes -days 7300 -newkey rsa:4096 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
openssl dhparam -out /etc/ssl/private/pure-ftpd-dhparams.pem 3072
chmod 0600 /etc/ssl/private/pure-ftpd.pem /etc/ssl/private/pure-ftpd-dhparams.pem
]]>
</content>
</file>
<commands index="1">
<command><![CDATA[/etc/pure-ftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/pure-ftpd/create-cert.sh]]></command>
</commands>
<file name="/etc/pure-ftpd/conf/TLS"
chown="root:0" chmod="0644">
<content><![CDATA[
1
]]>
</content>
</file>
<file name="/etc/pure-ftpd/conf/MinUID" chown="root:0"
chmod="0644">
<content><![CDATA[
@@ -3322,6 +3342,7 @@ aliases: files
<!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<install><![CDATA[apt-get install cron]]></install>
<command><![CDATA[/usr/bin/php <BASE_PATH>bin/froxlor-cli froxlor:cron --run-task 99]]></command>
<command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon>

View File

@@ -4544,6 +4544,26 @@ TLSVerifyClient off
<!-- Pureftpd -->
<daemon name="pureftpd" title="PureFTPd">
<install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install>
<file name="/etc/pure-ftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash
[ -f /etc/ssl/private/pure-ftpd.pem ] || openssl req -x509 -nodes -days 7300 -newkey rsa:4096 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
openssl dhparam -out /etc/ssl/private/pure-ftpd-dhparams.pem 3072
chmod 0600 /etc/ssl/private/pure-ftpd.pem /etc/ssl/private/pure-ftpd-dhparams.pem
]]>
</content>
</file>
<commands index="1">
<command><![CDATA[/etc/pure-ftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/pure-ftpd/create-cert.sh]]></command>
</commands>
<file name="/etc/pure-ftpd/conf/TLS"
chown="root:0" chmod="0644">
<content><![CDATA[
1
]]>
</content>
</file>
<file name="/etc/pure-ftpd/conf/MinUID" chown="root:0"
chmod="0644">
<content><![CDATA[
@@ -4894,6 +4914,7 @@ aliases: files
<!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<install><![CDATA[apt-get install cron]]></install>
<command><![CDATA[/usr/bin/php <BASE_PATH>bin/froxlor-cli froxlor:cron --run-task 99]]></command>
<command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon>

View File

@@ -4535,6 +4535,26 @@ TLSVerifyClient off
<!-- Pureftpd -->
<daemon name="pureftpd" title="PureFTPd">
<install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install>
<file name="/etc/pure-ftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash
[ -f /etc/ssl/private/pure-ftpd.pem ] || openssl req -x509 -nodes -days 7300 -newkey rsa:4096 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
openssl dhparam -out /etc/ssl/private/pure-ftpd-dhparams.pem 3072
chmod 0600 /etc/ssl/private/pure-ftpd.pem /etc/ssl/private/pure-ftpd-dhparams.pem
]]>
</content>
</file>
<commands index="1">
<command><![CDATA[/etc/pure-ftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/pure-ftpd/create-cert.sh]]></command>
</commands>
<file name="/etc/pure-ftpd/conf/TLS"
chown="root:0" chmod="0644">
<content><![CDATA[
1
]]>
</content>
</file>
<file name="/etc/pure-ftpd/conf/MinUID" chown="root:0"
chmod="0644">
<content><![CDATA[
@@ -4885,6 +4905,7 @@ aliases: files
<!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<install><![CDATA[apt-get install cron]]></install>
<command><![CDATA[/usr/bin/php <BASE_PATH>bin/froxlor-cli froxlor:cron --run-task 99]]></command>
<command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon>

View File

@@ -3750,6 +3750,26 @@ TLSVerifyClient off
<!-- Pureftpd -->
<daemon name="pureftpd" title="PureFTPd">
<install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install>
<file name="/etc/pure-ftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash
[ -f /etc/ssl/private/pure-ftpd.pem ] || openssl req -x509 -nodes -days 7300 -newkey rsa:4096 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
openssl dhparam -out /etc/ssl/private/pure-ftpd-dhparams.pem 3072
chmod 0600 /etc/ssl/private/pure-ftpd.pem /etc/ssl/private/pure-ftpd-dhparams.pem
]]>
</content>
</file>
<commands index="1">
<command><![CDATA[/etc/pure-ftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/pure-ftpd/create-cert.sh]]></command>
</commands>
<file name="/etc/pure-ftpd/conf/TLS"
chown="root:0" chmod="0644">
<content><![CDATA[
1
]]>
</content>
</file>
<file name="/etc/pure-ftpd/conf/MinUID" chown="root:0"
chmod="0644">
<content><![CDATA[
@@ -4108,6 +4128,7 @@ aliases: files
<!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<install><![CDATA[apt-get install cron]]></install>
<command><![CDATA[/usr/bin/php <BASE_PATH>bin/froxlor-cli froxlor:cron --run-task 99]]></command>
<command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon>

View File

@@ -3525,6 +3525,19 @@ UseReverseDNS off
<daemon name="pureftpd" title="PureFTPd">
<command><![CDATA[echo "net-ftp/pure-ftpd mysql" >> /etc/portage/package.use/froxlor]]></command>
<install><![CDATA[emerge net-ftp/pure-ftpd]]></install>
<file name="/etc/pure-ftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash
[ -f /etc/ssl/private/pure-ftpd.pem ] || openssl req -x509 -nodes -days 7300 -newkey rsa:4096 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
openssl dhparam -out /etc/ssl/private/pure-ftpd-dhparams.pem 3072
chmod 0600 /etc/ssl/private/pure-ftpd.pem /etc/ssl/private/pure-ftpd-dhparams.pem
]]>
</content>
</file>
<commands index="1">
<command><![CDATA[/etc/pure-ftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/pure-ftpd/create-cert.sh]]></command>
</commands>
<file name="/etc/conf.d/pure-ftpd" chown="root:0" chmod="0644"
backup="true">
<content><![CDATA[
@@ -3550,7 +3563,7 @@ DISK_FULL="-k 90%"
AUTH="-l mysql:/etc/pureftpd-mysql.conf"
## Misc. Others ##
MISC_OTHER="-A -x -j -Z"
MISC_OTHER="-A -x -j -Z -Y 1"
]]>
</content>
</file>
@@ -3563,7 +3576,7 @@ MYSQLSocket /var/run/mysqld/mysqld.sock
MYSQLUser <SQL_UNPRIVILEGED_USER>
MYSQLPassword <SQL_UNPRIVILEGED_PASSWORD>
MYSQLDatabase <SQL_DB>
MYSQLCrypt Crypt
MYSQLCrypt any
MYSQLGetPW SELECT password FROM ftp_users WHERE username="\L" AND login_enabled="y"
MYSQLGetUID SELECT uid FROM ftp_users WHERE username="\L" AND login_enabled="y"
MYSQLGetGID SELECT gid FROM ftp_users WHERE username="\L" AND login_enabled="y"
@@ -3910,6 +3923,7 @@ aliases: files
<!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<install><![CDATA[emerge sys-process/cronie]]></install>
<command><![CDATA[/usr/bin/php <BASE_PATH>bin/froxlor-cli froxlor:cron --run-task 99]]></command>
<command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon>

View File

@@ -3750,6 +3750,26 @@ TLSVerifyClient off
<!-- Pureftpd -->
<daemon name="pureftpd" title="PureFTPd">
<install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install>
<file name="/etc/pure-ftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash
[ -f /etc/ssl/private/pure-ftpd.pem ] || openssl req -x509 -nodes -days 7300 -newkey rsa:4096 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
openssl dhparam -out /etc/ssl/private/pure-ftpd-dhparams.pem 3072
chmod 0600 /etc/ssl/private/pure-ftpd.pem /etc/ssl/private/pure-ftpd-dhparams.pem
]]>
</content>
</file>
<commands index="1">
<command><![CDATA[/etc/pure-ftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/pure-ftpd/create-cert.sh]]></command>
</commands>
<file name="/etc/pure-ftpd/conf/TLS"
chown="root:0" chmod="0644">
<content><![CDATA[
1
]]>
</content>
</file>
<file name="/etc/pure-ftpd/conf/MinUID" chown="root:0"
chmod="0644">
<content><![CDATA[
@@ -4108,6 +4128,7 @@ aliases: files
<!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<install><![CDATA[apt-get install cron]]></install>
<command><![CDATA[/usr/bin/php <BASE_PATH>bin/froxlor-cli froxlor:cron --run-task 99]]></command>
<command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon>

View File

@@ -2117,6 +2117,7 @@ Vielen Dank, Ihr Administrator',
'http' => 'HTTP',
'ftp' => 'FTP',
'mail' => 'Mail',
'nocustomers' => 'Es wird mindestens ein Kunde benötigt um die Traffic Statistiken anzuzeigen.',
],
'translator' => '',
'update' => [

View File

@@ -2243,6 +2243,7 @@ Yours sincerely, your administrator',
'http' => 'HTTP',
'ftp' => 'FTP',
'mail' => 'Mail',
'nocustomers' => 'You need at least one customer to view the traffic reports.',
],
'translator' => '',
'update' => [

View File

@@ -97,7 +97,7 @@ if ($action == '' || $action == 'view') {
'editid' => $id,
'actions_links' => [
[
'class' => 'btn-secondary',
'class' => 'btn-outline-secondary',
'href' => $linker->getLink([
'section' => 'domains',
'page' => 'domains',

View File

@@ -20,7 +20,7 @@
width: 70vh;
max-height: 50vh;
background: #fff;
background: $search-bg;
border: $border-color solid 1px;
border-radius: 0 0 $border-radius $border-radius;

View File

@@ -20,6 +20,8 @@ $nav-link-color: $body-color;
// List groups
$list-group-bg: $gray-800;
$list-group-color: $body-color;
$list-group-hover-bg: $gray-700;
$list-group-action-color: $body-color;
// Navbar
$navbar-bg: $gray-800;
@@ -51,3 +53,9 @@ $modal-content-bg: $gray-800;
$input-bg: $gray-900;
$input-border-color: $black;
$input-group-addon-bg: $gray-800;
// Progress bar
$progress-bg: $gray-900;
// Search
$search-bg: $gray-800;

View File

@@ -80,3 +80,6 @@ $card-border-width: 0;
$heading-bg: $navbar-bg;
$heading-color: $body-color;
$heading-border-color: #dee2e6;
// Search
$search-bg: $navbar-bg;

View File

@@ -25,7 +25,7 @@
{% if zonefile is not empty %}
<div class="row">
<div class="col-12">
<textarea class="logcontent form-control bg-light" rows="25" cols="60" readonly>{{ zonefile }}</textarea>
<textarea class="logcontent form-control" rows="25" cols="60" readonly>{{ zonefile }}</textarea>
</div>
</div>
{% endif %}