Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cf3f4ee24 | ||
|
|
e83f7634f8 | ||
|
|
6eb6595a46 | ||
|
|
bd48fb7328 | ||
|
|
769525bb56 | ||
|
|
9195fb3c98 | ||
|
|
82922f7aea | ||
|
|
db1a39b6d9 | ||
|
|
7fbbc2ea0b | ||
|
|
91d4432108 | ||
|
|
c8914312aa |
@@ -265,7 +265,37 @@ return array(
|
||||
'traffic.mail' => $lng['menue']['traffic']['traffic'] . " / Mail"
|
||||
),
|
||||
'save_method' => 'storeSettingField'
|
||||
)
|
||||
),
|
||||
'panel_imprint_url' => array(
|
||||
'label' => $lng['serversettings']['imprint_url'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'imprint_url',
|
||||
'type' => 'string',
|
||||
'string_type' => 'url',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'panel_terms_url' => array(
|
||||
'label' => $lng['serversettings']['terms_url'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'terms_url',
|
||||
'type' => 'string',
|
||||
'string_type' => 'url',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'panel_privacy_url' => array(
|
||||
'label' => $lng['serversettings']['privacy_url'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'privacy_url',
|
||||
'type' => 'string',
|
||||
'string_type' => 'url',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -193,8 +193,12 @@ if ($page == 'overview') {
|
||||
\Froxlor\UI\Response::standard_error('oldpasswordnotcorrect');
|
||||
}
|
||||
|
||||
$new_password = \Froxlor\Validate\Validate::validate($_POST['new_password'], 'new password');
|
||||
$new_password_confirm = \Froxlor\Validate\Validate::validate($_POST['new_password_confirm'], 'new password confirm');
|
||||
try {
|
||||
$new_password = \Froxlor\System\Crypt::validatePassword($_POST['new_password'], 'new password');
|
||||
$new_password_confirm = \Froxlor\System\Crypt::validatePassword($_POST['new_password_confirm'], 'new password confirm');
|
||||
} catch (Exception $e) {
|
||||
\Froxlor\UI\Response::dynamic_error($e->getMessage());
|
||||
}
|
||||
|
||||
if ($old_password == '') {
|
||||
\Froxlor\UI\Response::standard_error(array(
|
||||
|
||||
14
composer.lock
generated
14
composer.lock
generated
@@ -150,16 +150,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.2.0",
|
||||
"version": "v6.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "e38888a75c070304ca5514197d4847a59a5c853f"
|
||||
"reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e38888a75c070304ca5514197d4847a59a5c853f",
|
||||
"reference": "e38888a75c070304ca5514197d4847a59a5c853f",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9256f12d8fb0cd0500f93b19e18c356906cbed3d",
|
||||
"reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -177,7 +177,7 @@
|
||||
"yoast/phpunit-polyfills": "^0.2.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "Needed to send email in multibyte encoding charset",
|
||||
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
|
||||
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
|
||||
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
|
||||
"psr/log": "For optional PSR-3 debug logging",
|
||||
@@ -214,7 +214,7 @@
|
||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.2.0"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.4.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -222,7 +222,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2020-11-25T15:24:57+00:00"
|
||||
"time": "2021-04-29T12:25:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
|
||||
@@ -136,14 +136,20 @@ if ($page == 'overview') {
|
||||
|
||||
eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/index') . "\";");
|
||||
} elseif ($page == 'change_password') {
|
||||
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
$old_password = \Froxlor\Validate\Validate::validate($_POST['old_password'], 'old password');
|
||||
|
||||
if (! \Froxlor\System\Crypt::validatePasswordLogin($userinfo, $old_password, TABLE_PANEL_CUSTOMERS, 'customerid')) {
|
||||
\Froxlor\UI\Response::standard_error('oldpasswordnotcorrect');
|
||||
}
|
||||
|
||||
$new_password = \Froxlor\System\Crypt::validatePassword($_POST['new_password'], 'new password');
|
||||
$new_password_confirm = \Froxlor\System\Crypt::validatePassword($_POST['new_password_confirm'], 'new password confirm');
|
||||
try {
|
||||
$new_password = \Froxlor\System\Crypt::validatePassword($_POST['new_password'], 'new password');
|
||||
$new_password_confirm = \Froxlor\System\Crypt::validatePassword($_POST['new_password_confirm'], 'new password confirm');
|
||||
} catch (Exception $e) {
|
||||
\Froxlor\UI\Response::dynamic_error($e->getMessage());
|
||||
}
|
||||
|
||||
if ($old_password == '') {
|
||||
\Froxlor\UI\Response::standard_error(array(
|
||||
|
||||
@@ -270,9 +270,9 @@ CREATE TABLE `panel_domains` (
|
||||
`writeaccesslog` tinyint(1) DEFAULT '1',
|
||||
`writeerrorlog` tinyint(1) DEFAULT '1',
|
||||
`override_tls` tinyint(1) DEFAULT '0',
|
||||
`ssl_protocols` text,
|
||||
`ssl_cipher_list` text,
|
||||
`tlsv13_cipher_list` text,
|
||||
`ssl_protocols` varchar(255) NOT NULL DEFAULT '',
|
||||
`ssl_cipher_list` varchar(500) NOT NULL DEFAULT '',
|
||||
`tlsv13_cipher_list` varchar(500) NOT NULL DEFAULT '',
|
||||
`ssl_enabled` tinyint(1) DEFAULT '1',
|
||||
`ssl_honorcipherorder` tinyint(1) DEFAULT '0',
|
||||
`ssl_sessiontickets` tinyint(1) DEFAULT '1',
|
||||
@@ -711,8 +711,11 @@ opcache.interned_strings_buffer'),
|
||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||
('panel', 'customer_hide_options', ''),
|
||||
('panel', 'is_configured', '0'),
|
||||
('panel', 'version', '0.10.25'),
|
||||
('panel', 'db_version', '202103030');
|
||||
('panel', 'imprint_url', ''),
|
||||
('panel', 'terms_url', ''),
|
||||
('panel', 'privacy_url', ''),
|
||||
('panel', 'version', '0.10.26'),
|
||||
('panel', 'db_version', '202103240');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_tasks`;
|
||||
|
||||
@@ -735,6 +735,9 @@ if (\Froxlor\Froxlor::isDatabaseVersion('202101200')) {
|
||||
\Froxlor\Froxlor::updateToDbVersion('202102200');
|
||||
}
|
||||
|
||||
/*
|
||||
* skip due to potential "1118 Row size too large" error
|
||||
*
|
||||
if (\Froxlor\Froxlor::isDatabaseVersion('202102200')) {
|
||||
|
||||
showUpdateStep("Add new description fields to mail and domain table", true);
|
||||
@@ -744,8 +747,59 @@ if (\Froxlor\Froxlor::isDatabaseVersion('202102200')) {
|
||||
|
||||
\Froxlor\Froxlor::updateToDbVersion('202103030');
|
||||
}
|
||||
*/
|
||||
|
||||
if (\Froxlor\Froxlor::isFroxlorVersion('0.10.24')) {
|
||||
showUpdateStep("Updating from 0.10.24 to 0.10.25", false);
|
||||
\Froxlor\Froxlor::updateToVersion('0.10.25');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isDatabaseVersion('202102200') || \Froxlor\Froxlor::isDatabaseVersion('202103030')) {
|
||||
|
||||
showUpdateStep("Refactoring columns from large tables", true);
|
||||
Database::query("ALTER TABLE panel_domains CHANGE `ssl_protocols` `ssl_protocols` varchar(255) NOT NULL DEFAULT '';");
|
||||
Database::query("ALTER TABLE panel_domains CHANGE `ssl_cipher_list` `ssl_cipher_list` varchar(500) NOT NULL DEFAULT '';");
|
||||
Database::query("ALTER TABLE panel_domains CHANGE `tlsv13_cipher_list` `tlsv13_cipher_list` varchar(500) NOT NULL DEFAULT '';");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Add new description fields to mail and domain table", true);
|
||||
$result = Database::query("DESCRIBE `panel_domains`");
|
||||
$columnfound = 0;
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
if ($row['Field'] == 'description') {
|
||||
$columnfound = 1;
|
||||
}
|
||||
}
|
||||
if (! $columnfound) {
|
||||
Database::query("ALTER TABLE panel_domains ADD `description` varchar(255) NOT NULL DEFAULT '' AFTER `ssl_sessiontickets`;");
|
||||
}
|
||||
$result = Database::query("DESCRIBE `mail_virtual`");
|
||||
$columnfound = 0;
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
if ($row['Field'] == 'description') {
|
||||
$columnfound = 1;
|
||||
}
|
||||
}
|
||||
if (! $columnfound) {
|
||||
Database::query("ALTER TABLE mail_virtual ADD `description` varchar(255) NOT NULL DEFAULT '' AFTER `iscatchall`");
|
||||
}
|
||||
lastStepStatus(0);
|
||||
|
||||
\Froxlor\Froxlor::updateToDbVersion('202103110');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isDatabaseVersion('202103110')) {
|
||||
|
||||
showUpdateStep("Adding settings for imprint, terms of use and privacy policy URLs", true);
|
||||
Settings::AddNew("panel.imprint_url", '');
|
||||
Settings::AddNew("panel.terms_url", '');
|
||||
Settings::AddNew("panel.privacy_url", '');
|
||||
lastStepStatus(0);
|
||||
|
||||
\Froxlor\Froxlor::updateToDbVersion('202103240');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isFroxlorVersion('0.10.25')) {
|
||||
showUpdateStep("Updating from 0.10.25 to 0.10.26", false);
|
||||
\Froxlor\Froxlor::updateToVersion('0.10.26');
|
||||
}
|
||||
|
||||
@@ -136,8 +136,24 @@ class DomainZones extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
// types
|
||||
if ($type == 'A' && filter_var($content, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) === false) {
|
||||
$errors[] = $this->lng['error']['dns_arec_noipv4'];
|
||||
} elseif ($type == 'A') {
|
||||
// check whether there is a CNAME-record for the same resource
|
||||
foreach ($dom_entries as $existing_entries) {
|
||||
if ($existing_entries['type'] == 'CNAME' && $existing_entries['record'] == $record) {
|
||||
$errors[] = $this->lng['error']['dns_other_nomorerr'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
} elseif ($type == 'AAAA' && filter_var($content, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === false) {
|
||||
$errors[] = $this->lng['error']['dns_aaaarec_noipv6'];
|
||||
} elseif ($type == 'AAAA') {
|
||||
// check whether there is a CNAME-record for the same resource
|
||||
foreach ($dom_entries as $existing_entries) {
|
||||
if ($existing_entries['type'] == 'CNAME' && $existing_entries['record'] == $record) {
|
||||
$errors[] = $this->lng['error']['dns_other_nomorerr'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
} elseif ($type == 'CAA' && ! empty($content)) {
|
||||
$re = '/(?\'critical\'\d)\h*(?\'type\'iodef|issue|issuewild)\h*(?\'value\'(?\'issuevalue\'"(?\'domain\'(?=.{3,128}$)(?>(?>[a-zA-Z0-9]+[a-zA-Z0-9-]*[a-zA-Z0-9]+|[a-zA-Z0-9]+)\.)*(?>[a-zA-Z]{2,}|[a-zA-Z0-9]{2,}\.[a-zA-Z]{2,}))[;\h]*(?\'parameters\'(?>[a-zA-Z0-9]{1,60}=[a-zA-Z0-9]{1,60}\h*)+)?")|(?\'iodefvalue\'"(?\'url\'(mailto:.*|http:\/\/.*|https:\/\/.*))"))/';
|
||||
preg_match($re, $content, $matches);
|
||||
@@ -198,6 +214,10 @@ class DomainZones extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
$errors[] = $this->lng['error']['dns_mx_noalias'];
|
||||
break;
|
||||
}
|
||||
elseif ($existing_entries['type'] == 'CNAME' && $existing_entries['record'] == $record) {
|
||||
$errors[] = $this->lng['error']['dns_other_nomorerr'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// append trailing dot (again)
|
||||
@@ -210,6 +230,14 @@ class DomainZones extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
}
|
||||
if (! \Froxlor\Validate\Validate::validateDomain($content)) {
|
||||
$errors[] = $this->lng['error']['dns_ns_invaliddom'];
|
||||
} else {
|
||||
// check whether there is a CNAME-record for the same resource
|
||||
foreach ($dom_entries as $existing_entries) {
|
||||
if ($existing_entries['type'] == 'CNAME' && $existing_entries['record'] == $record) {
|
||||
$errors[] = $this->lng['error']['dns_other_nomorerr'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// append trailing dot (again)
|
||||
$content .= '.';
|
||||
|
||||
@@ -565,7 +565,7 @@ class Apache extends HttpConfigBase
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function composePhpOptions($domain, $ssl_vhost = false)
|
||||
protected function composePhpOptions(&$domain, $ssl_vhost = false)
|
||||
{
|
||||
$php_options_text = '';
|
||||
|
||||
@@ -788,14 +788,6 @@ class Apache extends HttpConfigBase
|
||||
));
|
||||
$logfiles_text .= ' CustomLog "|' . $command . '" ' . $logtype . "\n";
|
||||
} else {
|
||||
// Create the logfile if it does not exist (fixes #46)
|
||||
touch($error_log);
|
||||
chown($error_log, Settings::Get('system.httpuser'));
|
||||
chgrp($error_log, Settings::Get('system.httpgroup'));
|
||||
touch($access_log);
|
||||
chown($access_log, Settings::Get('system.httpuser'));
|
||||
chgrp($access_log, Settings::Get('system.httpgroup'));
|
||||
|
||||
$logfiles_text .= ' ErrorLog "' . $error_log . '"' . "\n";
|
||||
$logfiles_text .= ' CustomLog "' . $access_log . '" ' . $logtype . "\n";
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ use Froxlor\Cron\Http\Php\PhpInterface;
|
||||
class ApacheFcgi extends Apache
|
||||
{
|
||||
|
||||
protected function composePhpOptions($domain, $ssl_vhost = false)
|
||||
protected function composePhpOptions(&$domain, $ssl_vhost = false)
|
||||
{
|
||||
$php_options_text = '';
|
||||
|
||||
@@ -43,6 +43,8 @@ class ApacheFcgi extends Apache
|
||||
$php_options_text .= ' SuexecUserGroup "' . $domain['loginname'] . '" "' . $domain['loginname'] . '"' . "\n";
|
||||
}
|
||||
|
||||
$domain['fpm_socket'] = $php->getInterface()->getSocketFile();
|
||||
|
||||
// mod_proxy stuff for apache-2.4
|
||||
if (Settings::Get('system.apache24') == '1' && Settings::Get('phpfpm.use_mod_proxy') == '1') {
|
||||
$filesmatch = $phpconfig['fpm_settings']['limit_extensions'];
|
||||
@@ -54,7 +56,7 @@ class ApacheFcgi extends Apache
|
||||
// start block, cut off last pipe and close block
|
||||
$filesmatch = '(' . str_replace(".", "\.", substr($filesmatch, 0, - 1)) . ')';
|
||||
$php_options_text .= ' <FilesMatch \.' . $filesmatch . '$>' . "\n";
|
||||
$php_options_text .= ' SetHandler proxy:unix:' . $php->getInterface()->getSocketFile() . '|fcgi://localhost' . "\n";
|
||||
$php_options_text .= ' SetHandler proxy:unix:' . $domain['fpm_socket'] . '|fcgi://localhost' . "\n";
|
||||
$php_options_text .= ' </FilesMatch>' . "\n";
|
||||
|
||||
$mypath_dir = new \Froxlor\Http\Directory($domain['documentroot']);
|
||||
@@ -80,7 +82,7 @@ class ApacheFcgi extends Apache
|
||||
if ($phpconfig['pass_authorizationheader'] == '1') {
|
||||
$addheader = " -pass-header Authorization";
|
||||
}
|
||||
$php_options_text .= ' FastCgiExternalServer ' . $php->getInterface()->getAliasConfigDir() . $srvName . ' -socket ' . $php->getInterface()->getSocketFile() . ' -idle-timeout ' . $phpconfig['fpm_settings']['idle_timeout'] . $addheader . "\n";
|
||||
$php_options_text .= ' FastCgiExternalServer ' . $php->getInterface()->getAliasConfigDir() . $srvName . ' -socket ' . $domain['fpm_socket'] . ' -idle-timeout ' . $phpconfig['fpm_settings']['idle_timeout'] . $addheader . "\n";
|
||||
$php_options_text .= ' <Directory "' . \Froxlor\FileDir::makeCorrectDir($domain['documentroot']) . '">' . "\n";
|
||||
$filesmatch = $phpconfig['fpm_settings']['limit_extensions'];
|
||||
$extensions = explode(" ", $filesmatch);
|
||||
|
||||
@@ -98,8 +98,12 @@ class HttpConfigBase
|
||||
'IP' => $ip,
|
||||
'PORT' => $port,
|
||||
'SCHEME' => ($is_ssl_vhost) ? 'https' : 'http',
|
||||
'DOCROOT' => $domain['documentroot']
|
||||
'DOCROOT' => $domain['documentroot'],
|
||||
'FPMSOCKET' => ''
|
||||
);
|
||||
if ((int) Settings::Get('phpfpm.enabled') == 1 && isset($domain['fpm_socket']) && !empty($domain['fpm_socket'])) {
|
||||
$templateVars['FPMSOCKET'] = $domain['fpm_socket'];
|
||||
}
|
||||
return \Froxlor\PhpHelper::replaceVariables($template, $templateVars);
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ class Lighttpd extends HttpConfigBase
|
||||
return;
|
||||
}
|
||||
|
||||
protected function composePhpOptions($domain)
|
||||
protected function composePhpOptions(&$domain)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ use Froxlor\Cron\Http\Php\PhpInterface;
|
||||
class LighttpdFcgi extends Lighttpd
|
||||
{
|
||||
|
||||
protected function composePhpOptions($domain)
|
||||
protected function composePhpOptions(&$domain)
|
||||
{
|
||||
$php_options_text = '';
|
||||
|
||||
@@ -32,10 +32,11 @@ class LighttpdFcgi extends Lighttpd
|
||||
|
||||
// vhost data for php-fpm
|
||||
if ((int) Settings::Get('phpfpm.enabled') == 1) {
|
||||
$domain['fpm_socket'] = $php->getInterface()->getSocketFile();
|
||||
$php_options_text = ' fastcgi.server = ( ' . "\n";
|
||||
$php_options_text .= "\t" . '".php" => (' . "\n";
|
||||
$php_options_text .= "\t\t" . '"localhost" => (' . "\n";
|
||||
$php_options_text .= "\t\t" . '"socket" => "' . $php->getInterface()->getSocketFile() . '",' . "\n";
|
||||
$php_options_text .= "\t\t" . '"socket" => "' . $domain['fpm_socket'] . '",' . "\n";
|
||||
$php_options_text .= "\t\t" . '"check-local" => "enable",' . "\n";
|
||||
$php_options_text .= "\t\t" . '"disable-time" => 1' . "\n";
|
||||
$php_options_text .= "\t" . ')' . "\n";
|
||||
|
||||
@@ -970,7 +970,7 @@ class Nginx extends HttpConfigBase
|
||||
return $returnval;
|
||||
}
|
||||
|
||||
protected function composePhpOptions($domain, $ssl_vhost = false)
|
||||
protected function composePhpOptions(&$domain, $ssl_vhost = false)
|
||||
{
|
||||
$phpopts = '';
|
||||
if ($domain['phpenabled_customer'] == 1 && $domain['phpenabled_vhost'] == '1') {
|
||||
|
||||
@@ -22,7 +22,7 @@ use Froxlor\Cron\Http\Php\PhpInterface;
|
||||
class NginxFcgi extends Nginx
|
||||
{
|
||||
|
||||
protected function composePhpOptions($domain, $ssl_vhost = false)
|
||||
protected function composePhpOptions(&$domain, $ssl_vhost = false)
|
||||
{
|
||||
$php_options_text = '';
|
||||
|
||||
@@ -43,7 +43,8 @@ class NginxFcgi extends Nginx
|
||||
if ($domain['ssl'] == '1' && $ssl_vhost) {
|
||||
$php_options_text .= "\t\t" . 'fastcgi_param HTTPS on;' . "\n";
|
||||
}
|
||||
$php_options_text .= "\t\t" . 'fastcgi_pass unix:' . $php->getInterface()->getSocketFile() . ";\n";
|
||||
$domain['fpm_socket'] = $php->getInterface()->getSocketFile();
|
||||
$php_options_text .= "\t\t" . 'fastcgi_pass unix:' . $domain['fpm_socket'] . ";\n";
|
||||
$php_options_text .= "\t\t" . 'fastcgi_index index.php;' . "\n";
|
||||
$php_options_text .= "\t}\n\n";
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class Extrausers
|
||||
{
|
||||
// passwd
|
||||
$passwd = '/var/lib/extrausers/passwd';
|
||||
$sql = "SELECT customerid,username,'x' as password,uid,gid,'Froxlor User' as comment,homedir,shell, login_enabled FROM ftp_users ORDER BY uid ASC";
|
||||
$sql = "SELECT customerid,username,'x' as password,uid,gid,'Froxlor User' as comment,homedir,shell, login_enabled FROM ftp_users ORDER BY uid, LENGTH(username) ASC";
|
||||
self::generateFile($passwd, $sql, $cronlog);
|
||||
|
||||
// group
|
||||
|
||||
@@ -7,10 +7,10 @@ final class Froxlor
|
||||
{
|
||||
|
||||
// Main version variable
|
||||
const VERSION = '0.10.25';
|
||||
const VERSION = '0.10.26';
|
||||
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
const DBVERSION = '202103030';
|
||||
const DBVERSION = '202103240';
|
||||
|
||||
// Distribution branding-tag (used for Debian etc.)
|
||||
const BRANDING = '';
|
||||
|
||||
12
lib/init.php
12
lib/init.php
@@ -480,6 +480,18 @@ if (array_key_exists('css', $_themeoptions['variants'][$themevariant]) && is_arr
|
||||
eval("\$header = \"" . \Froxlor\UI\Template::getTemplate('header', '1') . "\";");
|
||||
|
||||
$current_year = date('Y', time());
|
||||
$panel_imprint_url = Settings::Get('panel.imprint_url');
|
||||
if (!empty($panel_imprint_url) && strtolower(substr($panel_imprint_url, 0, 4)) != 'http') {
|
||||
$panel_imprint_url = 'https://'.$panel_imprint_url;
|
||||
}
|
||||
$panel_terms_url = Settings::Get('panel.terms_url');
|
||||
if (!empty($panel_terms_url) && strtolower(substr($panel_terms_url, 0, 4)) != 'http') {
|
||||
$panel_terms_url = 'https://'.$panel_terms_url;
|
||||
}
|
||||
$panel_privacy_url = Settings::Get('panel.privacy_url');
|
||||
if (!empty($panel_privacy_url) && strtolower(substr($panel_privacy_url, 0, 4)) != 'http') {
|
||||
$panel_privacy_url = 'https://'.$panel_privacy_url;
|
||||
}
|
||||
eval("\$footer = \"" . \Froxlor\UI\Template::getTemplate('footer', '1') . "\";");
|
||||
|
||||
unset($js);
|
||||
|
||||
@@ -683,7 +683,7 @@ $lng['message']['noreceipients'] = 'No e-mail has been sent because there are no
|
||||
$lng['admin']['sslsettings'] = 'SSL settings';
|
||||
$lng['cronjobs']['notyetrun'] = 'Not yet run';
|
||||
$lng['serversettings']['default_vhostconf']['title'] = 'Default vHost-settings';
|
||||
$lng['admin']['specialsettings_replacements'] = "You can use the following variables:<br/><code>{DOMAIN}</code>, <code>{DOCROOT}</code>, <code>{CUSTOMER}</code>, <code>{IP}</code>, <code>{PORT}</code>, <code>{SCHEME}</code><br/>";
|
||||
$lng['admin']['specialsettings_replacements'] = "You can use the following variables:<br/><code>{DOMAIN}</code>, <code>{DOCROOT}</code>, <code>{CUSTOMER}</code>, <code>{IP}</code>, <code>{PORT}</code>, <code>{SCHEME}</code>, <code>{FPMSOCKET}</code> (if applicable)<br/>";
|
||||
$lng['serversettings']['default_vhostconf']['description'] = 'The content of this field will be included into this ip/port vHost container directly. ' . $lng['admin']['specialsettings_replacements'] . ' Attention: The code won\'t be checked for any errors. If it contains errors, webserver might not start again!';
|
||||
$lng['serversettings']['apache_globaldiropt']['title'] = 'Directory options for customer-prefix';
|
||||
$lng['serversettings']['apache_globaldiropt']['description'] = 'The content of this field will be included into the 05_froxlor_dirfix_nofcgid.conf apache config. If empty, the default value is used:<br><br>apache >=2.4<br><code>Require all granted<br>AllowOverride All</code><br><br>apache <=2.2<br><code>Order allow,deny<br>allow from all</code>';
|
||||
@@ -1908,6 +1908,7 @@ $lng['error']['dns_mx_needdom'] = 'The MX content value must be a valid domain-n
|
||||
$lng['error']['dns_mx_noalias'] = 'The MX-content value cannot be an CNAME entry.';
|
||||
$lng['error']['dns_cname_invaliddom'] = 'Invalid domain-name for CNAME record';
|
||||
$lng['error']['dns_cname_nomorerr'] = 'There already exists a resource-record with the same record-name. It can not be used as CNAME.';
|
||||
$lng['error']['dns_other_nomorerr'] = 'There already exists a CNAME record with the same record-name. It can not be used for another type.';
|
||||
$lng['error']['dns_ns_invaliddom'] = 'Invalid domain-name for NS record';
|
||||
$lng['error']['dns_srv_prioempty'] = 'Invalid SRV priority given';
|
||||
$lng['error']['dns_srv_invalidcontent'] = 'Invalid SRV content, must contain of fields weight, port and target, e.g.: 5 5060 sipserver.example.com.';
|
||||
@@ -2106,3 +2107,12 @@ $lng['error']['no_wwwcnamae_ifwwwalias'] = 'Cannot set CNAME record for "www" as
|
||||
$lng['serversettings']['hide_incompatible_settings'] = 'Hide incompatible settings';
|
||||
|
||||
$lng['serversettings']['soaemail'] = 'Mail address to use in SOA records (defaults to sender address from panel settings if empty)';
|
||||
$lng['imprint'] = 'Legal notes';
|
||||
$lng['serversettings']['imprint_url']['title'] = 'URL to legal notes / imprint';
|
||||
$lng['serversettings']['imprint_url']['description'] = 'Specify an URL to your legal notes / imprint site. The link will be visible on the login screen and on the footer when logged in.';
|
||||
$lng['terms'] = 'Terms of use';
|
||||
$lng['serversettings']['terms_url']['title'] = 'URL to terms of use';
|
||||
$lng['serversettings']['terms_url']['description'] = 'Specify an URL to your terms of use site. The link will be visible on the login screen and on the footer when logged in.';
|
||||
$lng['privacy'] = 'Privacy policy';
|
||||
$lng['serversettings']['privacy_url']['title'] = 'URL to privacy policy';
|
||||
$lng['serversettings']['privacy_url']['description'] = 'Specify an URL to your privacy policy site / imprint site. The link will be visible on the login screen and on the footer when logged in.';
|
||||
|
||||
@@ -676,7 +676,7 @@ $lng['message']['noreceipients'] = 'Es wurde keine E-Mail versendet, da sich kei
|
||||
$lng['admin']['sslsettings'] = 'SSL-Einstellungen';
|
||||
$lng['cronjobs']['notyetrun'] = 'Bisher nicht gestartet';
|
||||
$lng['serversettings']['default_vhostconf']['title'] = 'Standard vHost-Einstellungen';
|
||||
$lng['admin']['specialsettings_replacements'] = "Die folgenden Variablen können verwendet werden:<br/><code>{DOMAIN}</code>, <code>{DOCROOT}</code>, <code>{CUSTOMER}</code>, <code>{IP}</code>, <code>{PORT}</code>, <code>{SCHEME}</code><br/>";
|
||||
$lng['admin']['specialsettings_replacements'] = "Die folgenden Variablen können verwendet werden:<br/><code>{DOMAIN}</code>, <code>{DOCROOT}</code>, <code>{CUSTOMER}</code>, <code>{IP}</code>, <code>{PORT}</code>, <code>{SCHEME}</code>, <code>{FPMSOCKET}</code> (wenn zutreffend)<br/>";
|
||||
$lng['serversettings']['default_vhostconf']['description'] = 'Der Inhalt dieses Feldes wird direkt in den IP/Port-vHost-Container übernommen. ' . $lng['admin']['specialsettings_replacements'] . '<br /><strong>ACHTUNG:</strong> Der Code wird nicht auf Fehler geprüft. Etwaige Fehler werden also auch übernommen. Der Webserver könnte nicht mehr starten!';
|
||||
$lng['serversettings']['default_vhostconf_domain']['description'] = 'Der Inhalt dieses Feldes wird direkt in jeden Domain-vHost-Container übernommen. ' . $lng['admin']['specialsettings_replacements'] . '<strong>ACHTUNG:</strong> Der Code wird nicht auf Fehler geprüft. Etwaige Fehler werden also auch übernommen. Der Webserver könnte nicht mehr starten!';
|
||||
$lng['serversettings']['apache_globaldiropt']['title'] = 'Kunden-Prefix Ordner-Optionen';
|
||||
@@ -1558,6 +1558,7 @@ $lng['error']['dns_mx_needdom'] = 'Der Wert des MX Eintrags muss ein gültiger D
|
||||
$lng['error']['dns_mx_noalias'] = 'Der MX Eintrag darf kein CNAME Eintrag sein.';
|
||||
$lng['error']['dns_cname_invaliddom'] = 'Ungültiger Domain-Name für CNAME Eintrag';
|
||||
$lng['error']['dns_cname_nomorerr'] = 'Es existiert bereits ein Eintrag mit dem gleichen Namen. Dieser Eintrag kann daher nicht für CNAME genutzt werden.';
|
||||
$lng['error']['dns_other_nomorerr'] = 'Es existiert bereits ein CNAME Eintrag mit dem gleichen Namen. Dieser Eintrag kann daher nicht für einen anderen genutzt werden.';
|
||||
$lng['error']['dns_ns_invaliddom'] = 'Ungültiger Domain-Name für NS Eintrag';
|
||||
$lng['error']['dns_srv_prioempty'] = 'Ungültige SRV Priorität angegeben';
|
||||
$lng['error']['dns_srv_invalidcontent'] = 'Ungültiger Wert des SRV Eintrags, dieser muss aus den Feldern weight, port und target, bestehen. Bsp.: 5 5060 sipserver.example.com.';
|
||||
@@ -1752,3 +1753,12 @@ $lng['error']['no_wwwcnamae_ifwwwalias'] = 'Es kann kein CNAME Eintrag für "www
|
||||
$lng['serversettings']['hide_incompatible_settings'] = 'Inkompatible Einstellungen ausblenden';
|
||||
|
||||
$lng['serversettings']['soaemail'] = 'Mail-Adresse für SOA-Einträge (verwendet Panel-Absender-Name der Panel-Einstellungen falls leer)';
|
||||
$lng['imprint'] = 'Impressum';
|
||||
$lng['serversettings']['imprint_url']['title'] = 'URL zum Impressum';
|
||||
$lng['serversettings']['imprint_url']['description'] = 'Die URL zur Impressums-Seite. Der Link ist auf der Login-Seite und wenn eingeloggt, in der Fußzeile sichtbar.';
|
||||
$lng['terms'] = 'AGB';
|
||||
$lng['serversettings']['terms_url']['title'] = 'URL zu den AGB';
|
||||
$lng['serversettings']['terms_url']['description'] = 'Die URL zur AGB-Seite. Der Link ist auf der Login-Seite und wenn eingeloggt, in der Fußzeile sichtbar.';
|
||||
$lng['privacy'] = 'Datenschutzerklärung';
|
||||
$lng['serversettings']['privacy_url']['title'] = 'URL zur Datenschutzerklärung';
|
||||
$lng['serversettings']['privacy_url']['description'] = 'Die URL zur Datenschutzerklärungs-Seite. Der Link ist auf der Login-Seite und wenn eingeloggt, in der Fußzeile sichtbar.';
|
||||
|
||||
9
templates/Sparkle/assets/css/main.css
vendored
9
templates/Sparkle/assets/css/main.css
vendored
@@ -1737,4 +1737,11 @@ td.size-50 {
|
||||
font-weight: 700;
|
||||
padding: 5px 10px;
|
||||
color: #ffe !important;
|
||||
}
|
||||
}
|
||||
|
||||
.footer-link:after {
|
||||
content: " |";
|
||||
}
|
||||
.footer-link:last-child:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
5
templates/Sparkle/footer.tpl
vendored
5
templates/Sparkle/footer.tpl
vendored
@@ -4,11 +4,14 @@
|
||||
</div>
|
||||
</if>
|
||||
<footer>
|
||||
<span><img src="templates/{$theme}/assets/img/logo_grey.png" alt="Froxlor" />
|
||||
<span><img src="templates/{$theme}/assets/img/logo_grey.png" alt="Froxlor" />
|
||||
<if (\Froxlor\Settings::Get('admin.show_version_login') == '1' && $filename == 'index.php') || ($filename != 'index.php' && \Froxlor\Settings::Get('admin.show_version_footer') == '1')>
|
||||
{$version}{$branding}
|
||||
</if>
|
||||
© 2009-{$current_year} by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a><br />
|
||||
<if (\Froxlor\Settings::Get('panel.imprint_url')) != ''><a href="{$panel_imprint_url}" target="_blank" class="footer-link">{$lng['imprint']}</a></if>
|
||||
<if (\Froxlor\Settings::Get('panel.terms_url')) != ''><a href="{$panel_terms_url}" target="_blank" class="footer-link">{$lng['terms']}</a></if>
|
||||
<if (\Froxlor\Settings::Get('panel.privacy_url')) != ''><a href="{$panel_privacy_url}" target="_blank" class="footer-link">{$lng['privacy']}</a></if>
|
||||
</span>
|
||||
<if $lng['translator'] != ''>
|
||||
<br /><span>{$lng['panel']['translator']}: {$lng['translator']}
|
||||
|
||||
@@ -101,6 +101,7 @@ class DomainZonesTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerDomainZonesAddA
|
||||
*/
|
||||
public function testAdminDomainZonesListing()
|
||||
@@ -303,14 +304,14 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$json_result = DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertTrue(count($result) > 1);
|
||||
$found = false;
|
||||
foreach ($result as $entry) {
|
||||
if (substr($entry, -strlen($content)) == $content) {
|
||||
if (substr($entry, - strlen($content)) == $content) {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
@@ -328,7 +329,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$json_result = DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -341,7 +342,7 @@ class DomainZonesTest extends TestCase
|
||||
}
|
||||
}
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('@ 18000 IN CAA '.$content, $entry);
|
||||
$this->assertEquals('@ 18000 IN CAA ' . $content, $entry);
|
||||
}
|
||||
|
||||
public function testAdminDomainZonesAddCAAIssueWithTwoParameters()
|
||||
@@ -353,7 +354,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$json_result = DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -366,7 +367,7 @@ class DomainZonesTest extends TestCase
|
||||
}
|
||||
}
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('@ 18000 IN CAA '.$content, $entry);
|
||||
$this->assertEquals('@ 18000 IN CAA ' . $content, $entry);
|
||||
}
|
||||
|
||||
public function testAdminDomainZonesAddCAAInvalidIssueValue()
|
||||
@@ -378,7 +379,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$this->expectExceptionMessage("DNS content invalid");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
@@ -393,7 +394,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$this->expectExceptionMessage("DNS content invalid");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
@@ -408,7 +409,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$this->expectExceptionMessage("DNS content invalid");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
@@ -423,7 +424,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$json_result = DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -436,7 +437,7 @@ class DomainZonesTest extends TestCase
|
||||
}
|
||||
}
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('@ 18000 IN CAA '.$content, $entry);
|
||||
$this->assertEquals('@ 18000 IN CAA ' . $content, $entry);
|
||||
}
|
||||
|
||||
public function testAdminDomainZonesAddCAAIssueWildWithParameters()
|
||||
@@ -448,7 +449,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$json_result = DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -461,7 +462,7 @@ class DomainZonesTest extends TestCase
|
||||
}
|
||||
}
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('@ 18000 IN CAA '.$content, $entry);
|
||||
$this->assertEquals('@ 18000 IN CAA ' . $content, $entry);
|
||||
}
|
||||
|
||||
public function testAdminDomainZonesAddCAAIssueWildWithTwoParameters()
|
||||
@@ -473,7 +474,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$json_result = DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -486,7 +487,7 @@ class DomainZonesTest extends TestCase
|
||||
}
|
||||
}
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('@ 18000 IN CAA '.$content, $entry);
|
||||
$this->assertEquals('@ 18000 IN CAA ' . $content, $entry);
|
||||
}
|
||||
|
||||
public function testAdminDomainZonesAddCAAInvalidIssueWildValue()
|
||||
@@ -498,7 +499,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$this->expectExceptionMessage("DNS content invalid");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
@@ -513,7 +514,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$this->expectExceptionMessage("DNS content invalid");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
@@ -528,7 +529,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$this->expectExceptionMessage("DNS content invalid");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
@@ -543,7 +544,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$json_result = DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -556,7 +557,7 @@ class DomainZonesTest extends TestCase
|
||||
}
|
||||
}
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('@ 18000 IN CAA '.$content, $entry);
|
||||
$this->assertEquals('@ 18000 IN CAA ' . $content, $entry);
|
||||
}
|
||||
|
||||
public function testAdminDomainZonesAddCAAIodefMailInvalid()
|
||||
@@ -568,7 +569,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$this->expectExceptionMessage("DNS content invalid");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
@@ -583,7 +584,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$json_result = DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -596,7 +597,7 @@ class DomainZonesTest extends TestCase
|
||||
}
|
||||
}
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('@ 18000 IN CAA '.$content, $entry);
|
||||
$this->assertEquals('@ 18000 IN CAA ' . $content, $entry);
|
||||
}
|
||||
|
||||
public function testAdminDomainZonesAddCAAIodefHttpInvalid()
|
||||
@@ -608,7 +609,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$this->expectExceptionMessage("DNS content invalid");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
@@ -623,7 +624,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$json_result = DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -636,7 +637,7 @@ class DomainZonesTest extends TestCase
|
||||
}
|
||||
}
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('@ 18000 IN CAA '.$content, $entry);
|
||||
$this->assertEquals('@ 18000 IN CAA ' . $content, $entry);
|
||||
}
|
||||
|
||||
public function testAdminDomainZonesAddCAAIodefHttpsInvalid()
|
||||
@@ -648,7 +649,7 @@ class DomainZonesTest extends TestCase
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '@',
|
||||
'type' => 'CAA',
|
||||
'content' => $content,
|
||||
'content' => $content
|
||||
];
|
||||
$this->expectExceptionMessage("DNS content invalid");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
@@ -745,6 +746,38 @@ class DomainZonesTest extends TestCase
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminDomainZonesAddCname
|
||||
*/
|
||||
public function testAdminDomainZonesAddForExistingCname()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
// set domain to www-alias
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'selectserveralias' => '1'
|
||||
];
|
||||
Domains::getLocal($admin_userdata, $data)->update();
|
||||
|
||||
foreach ([
|
||||
'A' => '127.0.0.1',
|
||||
'AAAA' => '::1',
|
||||
'MX' => 'mail.example.com.',
|
||||
'NS' => 'ns.example.com.'
|
||||
] as $type => $val) {
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => 'db',
|
||||
'type' => $type,
|
||||
'content' => $val
|
||||
];
|
||||
$this->expectExceptionMessage('There already exists a CNAME record with the same record-name. It can not be used for another type.');
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminDomainZonesAddCname
|
||||
|
||||
Reference in New Issue
Block a user