Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe389ab208 | ||
|
|
63d915804a | ||
|
|
466c09137b | ||
|
|
3a738b7070 | ||
|
|
5ee9d3064a | ||
|
|
adb5c6734a | ||
|
|
7dff46b63e | ||
|
|
12883bafd6 | ||
|
|
c2b88200f0 | ||
|
|
634199780b | ||
|
|
e0275840ab | ||
|
|
bae8c86901 | ||
|
|
e8be3ee643 | ||
|
|
35ecdfa2f5 | ||
|
|
3e4a3ef4b0 |
@@ -105,6 +105,30 @@ return array(
|
||||
'hasVhostContainerEnabled'
|
||||
), true)
|
||||
),
|
||||
'system_honorcipherorder' => array(
|
||||
'label' => $lng['admin']['domain_honorcipherorder'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'honorcipherorder',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'visible' => \Froxlor\Settings::Get('system.use_ssl') && call_user_func(array(
|
||||
'\Froxlor\Settings\FroxlorVhostSettings',
|
||||
'hasVhostContainerEnabled'
|
||||
), true)
|
||||
),
|
||||
'system_sessiontickets' => array(
|
||||
'label' => $lng['admin']['domain_sessiontickets'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'sessiontickets',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
'visible' => \Froxlor\Settings::Get('system.use_ssl') && call_user_func(array(
|
||||
'\Froxlor\Settings\FroxlorVhostSettings',
|
||||
'hasVhostContainerEnabled'
|
||||
), true)
|
||||
),
|
||||
/**
|
||||
* FCGID
|
||||
*/
|
||||
|
||||
@@ -150,10 +150,10 @@ return array(
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'letsencryptca',
|
||||
'type' => 'option',
|
||||
'default' => 'testing',
|
||||
'default' => 'production',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(
|
||||
'testing' => 'https://acme-staging' . (\Froxlor\Settings::Get('system.leapiversion') == '2' ? '-v02' : '') . '.api.letsencrypt.org (Test)',
|
||||
'testing' => 'https://acme-staging-v0' . \Froxlor\Settings::Get('system.leapiversion') . '.api.letsencrypt.org (Test)',
|
||||
'production' => 'https://acme-v0' . \Froxlor\Settings::Get('system.leapiversion') . '.api.letsencrypt.org (Live)'
|
||||
),
|
||||
'save_method' => 'storeSettingField'
|
||||
|
||||
@@ -382,7 +382,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
try {
|
||||
// remove ssl ip/ports if set is empty
|
||||
if (isset($_POST['ssl_ipandport']) && empty($_POST['ssl_ipandport'])) {
|
||||
if (!isset($_POST['ssl_ipandport']) || empty($_POST['ssl_ipandport'])) {
|
||||
$_POST['remove_ssl_ipandport'] = true;
|
||||
}
|
||||
Domains::getLocal($userinfo, $_POST)->update();
|
||||
|
||||
@@ -42,7 +42,8 @@ if ($page == 'overview') {
|
||||
if ($action == '') {
|
||||
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_domains::domains");
|
||||
$fields = array(
|
||||
'd.domain' => $lng['domains']['domainname']
|
||||
'd.domain' => $lng['domains']['domainname'],
|
||||
'd.aliasdomain' => $lng['domains']['aliasdomain']
|
||||
);
|
||||
try {
|
||||
// get total count
|
||||
|
||||
@@ -112,11 +112,14 @@ if (! is_null($month) && ! is_null($year)) {
|
||||
|
||||
eval("echo \"" . \Froxlor\UI\Template::getTemplate('traffic/traffic_details') . "\";");
|
||||
} else {
|
||||
$result_stmt = Database::prepare("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
||||
FROM `" . TABLE_PANEL_TRAFFIC . "`
|
||||
WHERE `customerid` = :customerid
|
||||
GROUP BY `year` DESC, `month` DESC
|
||||
LIMIT 12");
|
||||
GROUP BY `year`, `month`
|
||||
ORDER BY `year` DESC, `month` DESC
|
||||
LIMIT 12
|
||||
");
|
||||
Database::pexecute($result_stmt, array(
|
||||
"customerid" => $userinfo['customerid']
|
||||
));
|
||||
|
||||
@@ -271,6 +271,9 @@ CREATE TABLE `panel_domains` (
|
||||
`ssl_protocols` text,
|
||||
`ssl_cipher_list` text,
|
||||
`tlsv13_cipher_list` text,
|
||||
`ssl_enabled` tinyint(1) DEFAULT '1',
|
||||
`ssl_honorcipherorder` tinyint(1) DEFAULT '0',
|
||||
`ssl_sessiontickets` tinyint(1) DEFAULT '1',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `customerid` (`customerid`),
|
||||
KEY `parentdomain` (`parentdomainid`),
|
||||
@@ -652,6 +655,8 @@ opcache.interned_strings_buffer'),
|
||||
('system', 'disable_le_selfcheck', '0'),
|
||||
('system', 'ssl_protocols', 'TLSv1,TLSv1.2'),
|
||||
('system', 'tlsv13_cipher_list', ''),
|
||||
('system', 'honorcipherorder', '0'),
|
||||
('system', 'sessiontickets', '1'),
|
||||
('system', 'logfiles_format', ''),
|
||||
('system', 'logfiles_type', '1'),
|
||||
('system', 'logfiles_piped', '0'),
|
||||
@@ -696,8 +701,8 @@ opcache.interned_strings_buffer'),
|
||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||
('panel', 'customer_hide_options', ''),
|
||||
('panel', 'is_configured', '0'),
|
||||
('panel', 'version', '0.10.7'),
|
||||
('panel', 'db_version', '201911220');
|
||||
('panel', 'version', '0.10.10'),
|
||||
('panel', 'db_version', '201912100');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_tasks`;
|
||||
|
||||
@@ -495,3 +495,31 @@ if (\Froxlor\Froxlor::isFroxlorVersion('0.10.6')) {
|
||||
showUpdateStep("Updating from 0.10.6 to 0.10.7", false);
|
||||
\Froxlor\Froxlor::updateToVersion('0.10.7');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isFroxlorVersion('0.10.7')) {
|
||||
showUpdateStep("Updating from 0.10.7 to 0.10.8", false);
|
||||
\Froxlor\Froxlor::updateToVersion('0.10.8');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isFroxlorVersion('0.10.8')) {
|
||||
showUpdateStep("Updating from 0.10.8 to 0.10.9", false);
|
||||
\Froxlor\Froxlor::updateToVersion('0.10.9');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isDatabaseVersion('201911220')) {
|
||||
showUpdateStep("Adding enhanced SSL control over domains");
|
||||
// customer domains
|
||||
Database::query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `ssl_enabled` tinyint(1) DEFAULT '1';");
|
||||
Database::query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `ssl_honorcipherorder` tinyint(1) DEFAULT '0' AFTER `ssl_enabled`;");
|
||||
Database::query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `ssl_sessiontickets` tinyint(1) DEFAULT '1' AFTER `ssl_honorcipherorder`;");
|
||||
// as setting for froxlor vhost
|
||||
Settings::AddNew("system.honorcipherorder", '0');
|
||||
Settings::AddNew("system.sessiontickets", '1');
|
||||
lastStepStatus(0);
|
||||
\Froxlor\Froxlor::updateToDbVersion('201912100');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isFroxlorVersion('0.10.9')) {
|
||||
showUpdateStep("Updating from 0.10.9 to 0.10.10", false);
|
||||
\Froxlor\Froxlor::updateToVersion('0.10.10');
|
||||
}
|
||||
|
||||
@@ -346,6 +346,15 @@ abstract class ApiCommand extends ApiParameter
|
||||
} else {
|
||||
$order .= " ORDER BY ";
|
||||
}
|
||||
|
||||
$nat_fields = [
|
||||
'`c`.`loginname`',
|
||||
'`a`.`loginname`',
|
||||
'`adminname`',
|
||||
'`databasename`',
|
||||
'`username`'
|
||||
];
|
||||
|
||||
foreach ($orderby as $field => $by) {
|
||||
$sortfield = explode('.', $field);
|
||||
foreach ($sortfield as $id => $sfield) {
|
||||
@@ -365,7 +374,7 @@ abstract class ApiCommand extends ApiParameter
|
||||
])) {
|
||||
$by = 'ASC';
|
||||
}
|
||||
if (\Froxlor\Settings::Get('panel.natsorting') == 1) {
|
||||
if (\Froxlor\Settings::Get('panel.natsorting') == 1 && in_array($field, $nat_fields)) {
|
||||
// Acts similar to php's natsort(), found in one comment at http://my.opera.com/cpr/blog/show.dml/160556
|
||||
$order .= "CONCAT( IF( ASCII( LEFT( " . $field . ", 5 ) ) > 57,
|
||||
LEFT( " . $field . ", 1 ), 0 ),
|
||||
|
||||
@@ -209,7 +209,7 @@ class Certificates extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resou
|
||||
} else {
|
||||
$certs_stmt_query .= "1 ";
|
||||
}
|
||||
$certs_stmt = Database::prepare($certs_stmt_query . $this->getSearchWhere($query_fields) . $this->getOrderBy() . $this->getLimit());
|
||||
$certs_stmt = Database::prepare($certs_stmt_query . $this->getSearchWhere($query_fields, true) . $this->getOrderBy() . $this->getLimit());
|
||||
$qry_params = array_merge($qry_params, $query_fields);
|
||||
Database::pexecute($certs_stmt, $qry_params, true, true);
|
||||
$result = array();
|
||||
|
||||
@@ -168,14 +168,15 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
* get ips connected to given domain as array
|
||||
*
|
||||
* @param number $domain_id
|
||||
* @param bool $ssl_only
|
||||
* optional, return only ssl enabled ip's, default false
|
||||
* @return array
|
||||
*/
|
||||
private function getIpsForDomain($domain_id = 0)
|
||||
private function getIpsForDomain($domain_id = 0, $ssl_only = false)
|
||||
{
|
||||
$resultips_stmt = Database::prepare("
|
||||
SELECT `ips`.* FROM `" . TABLE_DOMAINTOIP . "` AS `dti`, `" . TABLE_PANEL_IPSANDPORTS . "` AS `ips`
|
||||
WHERE `dti`.`id_ipandports` = `ips`.`id` AND `dti`.`id_domain` = :domainid
|
||||
");
|
||||
WHERE `dti`.`id_ipandports` = `ips`.`id` AND `dti`.`id_domain` = :domainid " . ($ssl_only ? " AND `ips`.`ssl` = '1'" : ""));
|
||||
|
||||
Database::pexecute($resultips_stmt, array(
|
||||
'domainid' => $domain_id
|
||||
@@ -260,6 +261,8 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
* optional, list of ssl-enabled ip/port id's to assign to this domain, default empty
|
||||
* @param bool $dont_use_default_ssl_ipandport_if_empty
|
||||
* optional, do NOT set the systems default ssl ip addresses if none are given via $ssl_ipandport parameter
|
||||
* @param bool $sslenabled
|
||||
* optional, whether or not SSL is enabled for this domain, regardless of the assigned ssl-ips, default 1 (true)
|
||||
* @param bool $http2
|
||||
* optional, whether to enable http/2 for this domain (requires to be enabled in the settings), default 0 (false)
|
||||
* @param int $hsts_maxage
|
||||
@@ -270,6 +273,10 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
* optional whether or not to preload HSTS header value
|
||||
* @param bool $ocsp_stapling
|
||||
* optional whether to enable ocsp-stapling for this domain. default 0 (false), requires SSL
|
||||
* @param bool $honorcipherorder
|
||||
* optional whether to honor the (server) cipher order for this domain. default 0 (false), requires SSL
|
||||
* @param bool $sessiontickets
|
||||
* optional whether to enable or disable TLS sessiontickets (RFC 5077) for this domain. default 1 (true), requires SSL
|
||||
* @param bool $override_tls
|
||||
* optional whether or not to override system-tls settings like protocol, ssl-ciphers and if applicable tls-1.3 ciphers, requires change_serversettings flag for the admin, default false
|
||||
* @param array $ssl_protocols
|
||||
@@ -324,11 +331,14 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
$letsencrypt = $this->getBoolParam('letsencrypt', true, 0);
|
||||
$dont_use_default_ssl_ipandport_if_empty = $this->getBoolParam('dont_use_default_ssl_ipandport_if_empty', true, 0);
|
||||
$p_ssl_ipandports = $this->getParam('ssl_ipandport', true, $dont_use_default_ssl_ipandport_if_empty ? array() : explode(',', Settings::Get('system.defaultsslip')));
|
||||
$sslenabled = $this->getBoolParam('sslenabled', true, 1);
|
||||
$http2 = $this->getBoolParam('http2', true, 0);
|
||||
$hsts_maxage = $this->getParam('hsts_maxage', true, 0);
|
||||
$hsts_sub = $this->getBoolParam('hsts_sub', true, 0);
|
||||
$hsts_preload = $this->getBoolParam('hsts_preload', true, 0);
|
||||
$ocsp_stapling = $this->getBoolParam('ocsp_stapling', true, 0);
|
||||
$honorcipherorder = $this->getBoolParam('honorcipherorder', true, 0);
|
||||
$sessiontickets = $this->getBoolParam('sessiontickets', true, 1);
|
||||
|
||||
$override_tls = $this->getBoolParam('override_tls', true, 0);
|
||||
$p_ssl_protocols = array();
|
||||
@@ -344,7 +354,8 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
}
|
||||
|
||||
// validation
|
||||
if ($p_domain == Settings::Get('system.hostname')) {
|
||||
$p_domain = strtolower($p_domain);
|
||||
if ($p_domain == strtolower(Settings::Get('system.hostname'))) {
|
||||
\Froxlor\UI\Response::standard_error('admin_domain_emailsystemhostname', '', true);
|
||||
}
|
||||
|
||||
@@ -712,7 +723,10 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
'override_tls' => $override_tls,
|
||||
'ssl_protocols' => implode(",", $ssl_protocols),
|
||||
'ssl_cipher_list' => $ssl_cipher_list,
|
||||
'tlsv13_cipher_list' => $tlsv13_cipher_list
|
||||
'tlsv13_cipher_list' => $tlsv13_cipher_list,
|
||||
'sslenabled' => $sslenabled,
|
||||
'honorcipherorder' => $honorcipherorder,
|
||||
'sessiontickets' => $sessiontickets
|
||||
);
|
||||
|
||||
$ins_stmt = Database::prepare("
|
||||
@@ -760,7 +774,10 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
`override_tls` = :override_tls,
|
||||
`ssl_protocols` = :ssl_protocols,
|
||||
`ssl_cipher_list` = :ssl_cipher_list,
|
||||
`tlsv13_cipher_list` = :tlsv13_cipher_list
|
||||
`tlsv13_cipher_list` = :tlsv13_cipher_list,
|
||||
`ssl_enabled` = :sslenabled,
|
||||
`ssl_honorcipherorder` = :honorcipherorder,
|
||||
`ssl_sessiontickets`= :sessiontickets
|
||||
");
|
||||
Database::pexecute($ins_stmt, $ins_data, true, true);
|
||||
$domainid = Database::lastInsertId();
|
||||
@@ -894,6 +911,8 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
* optional, list of ssl-enabled ip/port id's to assign to this domain, if left empty, the current set value is being used, to remove all ssl ips use $remove_ssl_ipandport
|
||||
* @param bool $remove_ssl_ipandport
|
||||
* optional, if set to true and no $ssl_ipandport value is given, the ip's get removed, otherwise, the currently set value is used, default false
|
||||
* @param bool $sslenabled
|
||||
* optional, whether or not SSL is enabled for this domain, regardless of the assigned ssl-ips, default 1 (true)
|
||||
* @param bool $http2
|
||||
* optional, whether to enable http/2 for this domain (requires to be enabled in the settings), default 0 (false)
|
||||
* @param int $hsts_maxage
|
||||
@@ -904,6 +923,10 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
* optional whether or not to preload HSTS header value
|
||||
* @param bool $ocsp_stapling
|
||||
* optional whether to enable ocsp-stapling for this domain. default 0 (false), requires SSL
|
||||
* @param bool $honorcipherorder
|
||||
* optional whether to honor the (server) cipher order for this domain. default 0 (false), requires SSL
|
||||
* @param bool $sessiontickets
|
||||
* optional whether to enable or disable TLS sessiontickets (RFC 5077) for this domain. default 1 (true), requires SSL
|
||||
*
|
||||
* @access admin
|
||||
* @throws \Exception
|
||||
@@ -964,11 +987,14 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
$p_ssl_ipandports = $this->getParam('ssl_ipandport', true, $remove_ssl_ipandport ? array(
|
||||
- 1
|
||||
) : null);
|
||||
$sslenabled = $this->getBoolParam('sslenabled', true, $result['ssl_enabled']);
|
||||
$http2 = $this->getBoolParam('http2', true, $result['http2']);
|
||||
$hsts_maxage = $this->getParam('hsts_maxage', true, $result['hsts']);
|
||||
$hsts_sub = $this->getBoolParam('hsts_sub', true, $result['hsts_sub']);
|
||||
$hsts_preload = $this->getBoolParam('hsts_preload', true, $result['hsts_preload']);
|
||||
$ocsp_stapling = $this->getBoolParam('ocsp_stapling', true, $result['ocsp_stapling']);
|
||||
$honorcipherorder = $this->getBoolParam('honorcipherorder', true, $result['ssl_honorcipherorder']);
|
||||
$sessiontickets = $this->getBoolParam('sessiontickets', true, $result['ssl_sessiontickets']);
|
||||
|
||||
$override_tls = $this->getBoolParam('override_tls', true, $result['override_tls']);
|
||||
|
||||
@@ -1546,6 +1572,9 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
$update_data['ssl_protocols'] = implode(",", $ssl_protocols);
|
||||
$update_data['ssl_cipher_list'] = $ssl_cipher_list;
|
||||
$update_data['tlsv13_cipher_list'] = $tlsv13_cipher_list;
|
||||
$update_data['sslenabled'] = $sslenabled;
|
||||
$update_data['honorcipherorder'] = $honorcipherorder;
|
||||
$update_data['sessiontickets'] = $sessiontickets;
|
||||
$update_data['id'] = $id;
|
||||
|
||||
$update_stmt = Database::prepare("
|
||||
@@ -1588,7 +1617,10 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
`override_tls` = :override_tls,
|
||||
`ssl_protocols` = :ssl_protocols,
|
||||
`ssl_cipher_list` = :ssl_cipher_list,
|
||||
`tlsv13_cipher_list` = :tlsv13_cipher_list
|
||||
`tlsv13_cipher_list` = :tlsv13_cipher_list,
|
||||
`ssl_enabled` = :sslenabled,
|
||||
`ssl_honorcipherorder` = :honorcipherorder,
|
||||
`ssl_sessiontickets` = :sessiontickets
|
||||
WHERE `id` = :id
|
||||
");
|
||||
Database::pexecute($update_stmt, $update_data, true, true);
|
||||
@@ -1603,6 +1635,8 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
$_update_data['ssl_protocols'] = implode(",", $ssl_protocols);
|
||||
$_update_data['ssl_cipher_list'] = $ssl_cipher_list;
|
||||
$_update_data['tlsv13_cipher_list'] = $tlsv13_cipher_list;
|
||||
$_update_data['honorcipherorder'] = $honorcipherorder;
|
||||
$_update_data['sessiontickets'] = $sessiontickets;
|
||||
$_update_data['parentdomainid'] = $id;
|
||||
|
||||
// if php config is to be set for all subdomains, check here
|
||||
@@ -1630,7 +1664,9 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
`override_tls` = :override_tls,
|
||||
`ssl_protocols` = :ssl_protocols,
|
||||
`ssl_cipher_list` = :ssl_cipher_list,
|
||||
`tlsv13_cipher_list` = :tlsv13_cipher_list
|
||||
`tlsv13_cipher_list` = :tlsv13_cipher_list,
|
||||
`ssl_honorcipherorder` = :honorcipherorder,
|
||||
`ssl_sessiontickets` = :sessiontickets
|
||||
" . $update_phpconfig . $upd_specialsettings . $updatechildren . $update_sslredirect . "
|
||||
WHERE `parentdomainid` = :parentdomainid
|
||||
");
|
||||
|
||||
@@ -42,7 +42,7 @@ class Froxlor extends \Froxlor\Api\ApiCommand
|
||||
try {
|
||||
$latestversion = \Froxlor\Http\HttpClient::urlGet(UPDATE_URI, true, 3);
|
||||
} catch (\Exception $e) {
|
||||
$latestversion = \Froxlor\Froxlor::getVersion()."|Version-check currently unavailable, please try again later";
|
||||
$latestversion = \Froxlor\Froxlor::getVersion() . "|Version-check currently unavailable, please try again later";
|
||||
}
|
||||
$latestversion = explode('|', $latestversion);
|
||||
|
||||
@@ -216,7 +216,7 @@ class Froxlor extends \Froxlor\Api\ApiCommand
|
||||
*/
|
||||
public function updateSetting()
|
||||
{
|
||||
// currently not implemented as it required validation too so no wrong settings are being stored via API
|
||||
// currently not implemented as it requires validation too so no wrong settings are being stored via API
|
||||
throw new \Exception("Not available yet.", 501);
|
||||
|
||||
if ($this->isAdmin() && $this->getUserDetail('change_serversettings')) {
|
||||
@@ -232,6 +232,17 @@ class Froxlor extends \Froxlor\Api\ApiCommand
|
||||
throw new \Exception("Not allowed to execute given command.", 403);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a random password based on froxlor settings for min-length, included characters, etc.
|
||||
*
|
||||
* @access admin, customer
|
||||
* @return string
|
||||
*/
|
||||
public function generatePassword()
|
||||
{
|
||||
return $this->response(200, "successfull", \Froxlor\System\Crypt::generatePassword());
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a list of all available api functions
|
||||
*
|
||||
|
||||
@@ -41,6 +41,8 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
* optional, php-settings-id, if empty the $domain value is used
|
||||
* @param int $redirectcode
|
||||
* optional, redirect-code-id from TABLE_PANEL_REDIRECTCODES
|
||||
* @param bool $sslenabled
|
||||
* optional, whether or not SSL is enabled for this domain, regardless of the assigned ssl-ips, default 1 (true)
|
||||
* @param bool $ssl_redirect
|
||||
* optional, whether to generate a https-redirect or not, default false; requires SSL to be enabled
|
||||
* @param bool $letsencrypt
|
||||
@@ -76,6 +78,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
$redirectcode = $this->getParam('redirectcode', true, Settings::Get('customredirect.default'));
|
||||
$isemaildomain = $this->getParam('isemaildomain', true, 0);
|
||||
if (Settings::Get('system.use_ssl')) {
|
||||
$sslenabled = $this->getBoolParam('sslenabled', true, 1);
|
||||
$ssl_redirect = $this->getBoolParam('ssl_redirect', true, 0);
|
||||
$letsencrypt = $this->getBoolParam('letsencrypt', true, 0);
|
||||
$http2 = $this->getBoolParam('http2', true, 0);
|
||||
@@ -83,6 +86,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
$hsts_sub = $this->getBoolParam('hsts_sub', true, 0);
|
||||
$hsts_preload = $this->getBoolParam('hsts_preload', true, 0);
|
||||
} else {
|
||||
$sslenabled = 0;
|
||||
$ssl_redirect = 0;
|
||||
$letsencrypt = 0;
|
||||
$http2 = 0;
|
||||
@@ -95,6 +99,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
$customer = $this->getCustomerData('subdomains');
|
||||
|
||||
// validation
|
||||
$subdomain = strtolower($subdomain);
|
||||
if (substr($subdomain, 0, 4) == 'xn--') {
|
||||
\Froxlor\UI\Response::standard_error('domain_nopunycode', '', true);
|
||||
}
|
||||
@@ -114,7 +119,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
'mydomain'
|
||||
), '', true);
|
||||
}
|
||||
if ($completedomain == Settings::Get('system.hostname')) {
|
||||
if ($completedomain == strtolower(Settings::Get('system.hostname'))) {
|
||||
\Froxlor\UI\Response::standard_error('admin_domain_emailsystemhostname', '', true);
|
||||
}
|
||||
|
||||
@@ -275,7 +280,8 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
`override_tls` = :override_tls,
|
||||
`ssl_protocols` = :ssl_protocols,
|
||||
`ssl_cipher_list` = :ssl_cipher_list,
|
||||
`tlsv13_cipher_list` = :tlsv13_cipher_list
|
||||
`tlsv13_cipher_list` = :tlsv13_cipher_list,
|
||||
`ssl_enabled` = :sslenabled
|
||||
");
|
||||
$params = array(
|
||||
"customerid" => $customer['customerid'],
|
||||
@@ -305,7 +311,8 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
"override_tls" => $domain_check['override_tls'],
|
||||
"ssl_protocols" => $domain_check['ssl_protocols'],
|
||||
"ssl_cipher_list" => $domain_check['ssl_cipher_list'],
|
||||
"tlsv13_cipher_list" => $domain_check['tlsv13_cipher_list']
|
||||
"tlsv13_cipher_list" => $domain_check['tlsv13_cipher_list'],
|
||||
"sslenabled" => $sslenabled
|
||||
);
|
||||
Database::pexecute($stmt, $params, true, true);
|
||||
$subdomain_id = Database::lastInsertId();
|
||||
@@ -446,6 +453,8 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
* optional, php-settings-id, if empty the $domain value is used
|
||||
* @param int $redirectcode
|
||||
* optional, redirect-code-id from TABLE_PANEL_REDIRECTCODES
|
||||
* @param bool $sslenabled
|
||||
* optional, whether or not SSL is enabled for this domain, regardless of the assigned ssl-ips, default 1 (true)
|
||||
* @param bool $ssl_redirect
|
||||
* optional, whether to generate a https-redirect or not, default false; requires SSL to be enabled
|
||||
* @param bool $letsencrypt
|
||||
@@ -493,6 +502,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
$phpsettingid = $this->getParam('phpsettingid', true, $result['phpsettingid']);
|
||||
$redirectcode = $this->getParam('redirectcode', true, \Froxlor\Domain\Domain::getDomainRedirectId($id));
|
||||
if (Settings::Get('system.use_ssl')) {
|
||||
$sslenabled = $this->getBoolParam('sslenabled', true, $result['ssl_enabled']);
|
||||
$ssl_redirect = $this->getBoolParam('ssl_redirect', true, $result['ssl_redirect']);
|
||||
$letsencrypt = $this->getBoolParam('letsencrypt', true, $result['letsencrypt']);
|
||||
$http2 = $this->getBoolParam('http2', true, $result['http2']);
|
||||
@@ -500,6 +510,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
$hsts_sub = $this->getBoolParam('hsts_sub', true, $result['hsts_sub']);
|
||||
$hsts_preload = $this->getBoolParam('hsts_preload', true, $result['hsts_preload']);
|
||||
} else {
|
||||
$sslenabled = 0;
|
||||
$ssl_redirect = 0;
|
||||
$letsencrypt = 0;
|
||||
$http2 = 0;
|
||||
@@ -610,14 +621,15 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
if ($path != $result['documentroot'] || $isemaildomain != $result['isemaildomain'] || $wwwserveralias != $result['wwwserveralias'] || $iswildcarddomain != $result['iswildcarddomain'] || $aliasdomain != $result['aliasdomain'] || $openbasedir_path != $result['openbasedir_path'] || $ssl_redirect != $result['ssl_redirect'] || $letsencrypt != $result['letsencrypt'] || $hsts_maxage != $result['hsts'] || $hsts_sub != $result['hsts_sub'] || $hsts_preload != $result['hsts_preload'] || $phpsettingid != $result['phpsettingid']) {
|
||||
$stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
|
||||
`documentroot`= :documentroot,
|
||||
`isemaildomain`= :isemaildomain,
|
||||
`wwwserveralias`= :wwwserveralias,
|
||||
`iswildcarddomain`= :iswildcarddomain,
|
||||
`aliasdomain`= :aliasdomain,
|
||||
`openbasedir_path`= :openbasedir_path,
|
||||
`ssl_redirect`= :ssl_redirect,
|
||||
`letsencrypt`= :letsencrypt,
|
||||
`documentroot` = :documentroot,
|
||||
`isemaildomain` = :isemaildomain,
|
||||
`wwwserveralias` = :wwwserveralias,
|
||||
`iswildcarddomain` = :iswildcarddomain,
|
||||
`aliasdomain` = :aliasdomain,
|
||||
`openbasedir_path` = :openbasedir_path,
|
||||
`ssl_enabled` = :sslenabled,
|
||||
`ssl_redirect` = :ssl_redirect,
|
||||
`letsencrypt` = :letsencrypt,
|
||||
`http2` = :http2,
|
||||
`hsts` = :hsts,
|
||||
`hsts_sub` = :hsts_sub,
|
||||
@@ -632,6 +644,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
"iswildcarddomain" => $iswildcarddomain,
|
||||
"aliasdomain" => ($aliasdomain != 0 && $alias_check == 0) ? $aliasdomain : null,
|
||||
"openbasedir_path" => $openbasedir_path,
|
||||
"sslenabled" => $sslenabled,
|
||||
"ssl_redirect" => $ssl_redirect,
|
||||
"letsencrypt" => $letsencrypt,
|
||||
"http2" => $http2,
|
||||
@@ -774,7 +787,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON `pd`.`id`=`d`.`parentdomainid`
|
||||
WHERE `d`.`customerid` IN (" . implode(', ', $customer_ids) . ")
|
||||
AND `d`.`email_only` = '0'
|
||||
AND `d`.`id` NOT IN (" . implode(', ', $customer_stdsubs) . ")" . $this->getSearchWhere($query_fields, true) . " ORDER BY `parentdomainname` " . $this->getOrderBy(true) . $this->getLimit());
|
||||
AND `d`.`id` NOT IN (" . implode(', ', $customer_stdsubs) . ")" . $this->getSearchWhere($query_fields, true) . " GROUP BY `d`.`id` ORDER BY `parentdomainname` " . $this->getOrderBy(true) . $this->getLimit());
|
||||
|
||||
$result = array();
|
||||
Database::pexecute($domains_stmt, $query_fields, true, true);
|
||||
@@ -840,8 +853,6 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
$domains_stmt = Database::prepare("
|
||||
SELECT COUNT(*) as num_subdom
|
||||
FROM `" . TABLE_PANEL_DOMAINS . "` `d`
|
||||
LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `ad` ON `d`.`aliasdomain`=`ad`.`id`
|
||||
LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `da` ON `da`.`aliasdomain`=`d`.`id`
|
||||
WHERE `d`.`customerid` IN (" . implode(', ', $customer_ids) . ")
|
||||
AND `d`.`email_only` = '0'
|
||||
AND `d`.`id` NOT IN (" . implode(', ', $customer_stdsubs) . ")
|
||||
|
||||
@@ -442,7 +442,9 @@ class Apache extends HttpConfigBase
|
||||
'loginname' => 'froxlor.panel',
|
||||
'documentroot' => $mypath,
|
||||
'customerroot' => $mypath,
|
||||
'parentdomainid' => 0
|
||||
'parentdomainid' => 0,
|
||||
'ssl_honorcipherorder' => Settings::Get('system.honorcipherorder'),
|
||||
'ssl_sessiontickets' => Settings::Get('system.sessiontickets')
|
||||
);
|
||||
|
||||
// override corresponding array values
|
||||
@@ -478,9 +480,10 @@ class Apache extends HttpConfigBase
|
||||
$this->virtualhosts_data[$vhosts_filename] .= ' SSLOpenSSLConfCmd DHParameters "' . $dhparams . '"' . "\n";
|
||||
}
|
||||
$this->virtualhosts_data[$vhosts_filename] .= ' SSLCompression Off' . "\n";
|
||||
$this->virtualhosts_data[$vhosts_filename] .= ' SSLSessionTickets ' . ($domain['ssl_sessiontickets'] == '1' ? 'on' : 'off') . "\n";
|
||||
}
|
||||
// this makes it more secure, thx to Marcel (08/2013)
|
||||
$this->virtualhosts_data[$vhosts_filename] .= ' SSLHonorCipherOrder On' . "\n";
|
||||
|
||||
$this->virtualhosts_data[$vhosts_filename] .= ' SSLHonorCipherOrder ' . ($domain['ssl_honorcipherorder'] == '1' ? 'on' : 'off') . "\n";
|
||||
$this->virtualhosts_data[$vhosts_filename] .= ' SSLCipherSuite ' . Settings::Get('system.ssl_cipher_list') . "\n";
|
||||
$protocols = array_map('trim', explode(",", Settings::Get('system.ssl_protocols')));
|
||||
if (in_array("TLSv1.3", $protocols) && ! empty(Settings::Get('system.tlsv13_cipher_list')) && Settings::Get('system.apache24') == 1) {
|
||||
@@ -986,9 +989,9 @@ class Apache extends HttpConfigBase
|
||||
$vhost_content .= ' SSLOpenSSLConfCmd DHParameters "' . $dhparams . '"' . "\n";
|
||||
}
|
||||
$vhost_content .= ' SSLCompression Off' . "\n";
|
||||
$vhost_content .= ' SSLSessionTickets ' . ($domain['ssl_sessiontickets'] == '1' ? 'on' : 'off') . "\n";
|
||||
}
|
||||
// this makes it more secure, thx to Marcel (08/2013)
|
||||
$vhost_content .= ' SSLHonorCipherOrder On' . "\n";
|
||||
$vhost_content .= ' SSLHonorCipherOrder ' . ($domain['ssl_honorcipherorder'] == '1' ? 'on' : 'off') . "\n";
|
||||
$vhost_content .= ' SSLCipherSuite ' . $ssl_cipher_list . "\n";
|
||||
$protocols = array_map('trim', explode(",", $ssl_protocols));
|
||||
if (in_array("TLSv1.3", $protocols) && ! empty($tlsv13_cipher_list) && Settings::Get('system.apache24') == 1) {
|
||||
@@ -1114,7 +1117,7 @@ class Apache extends HttpConfigBase
|
||||
// Create vhost without ssl
|
||||
$this->virtualhosts_data[$vhosts_filename] .= $this->getVhostContent($domain, false);
|
||||
|
||||
if ($domain['ssl'] == '1' || $domain['ssl_redirect'] == '1') {
|
||||
if ($domain['ssl_enabled'] == '1' && ($domain['ssl'] == '1' || $domain['ssl_redirect'] == '1')) {
|
||||
// Adding ssl stuff if enabled
|
||||
$vhosts_filename_ssl = $this->getVhostFilename($domain, true);
|
||||
$this->virtualhosts_data[$vhosts_filename_ssl] = '# Domain ID: ' . $domain['id'] . ' (SSL) - CustomerID: ' . $domain['customerid'] . ' - CustomerLogin: ' . $domain['loginname'] . "\n";
|
||||
|
||||
@@ -84,7 +84,7 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
|
||||
)
|
||||
");
|
||||
$customer_ssl = $certificates_stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||
if (!$customer_ssl) {
|
||||
if (! $customer_ssl) {
|
||||
$customer_ssl = array();
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
|
||||
(`expirationdate` < DATE_ADD(NOW(), INTERVAL 30 DAY) OR `expirationdate` IS NULL)
|
||||
");
|
||||
$froxlor_ssl = Database::pexecute_first($froxlor_ssl_settings_stmt);
|
||||
if (!$froxlor_ssl) {
|
||||
if (! $froxlor_ssl) {
|
||||
$froxlor_ssl = array();
|
||||
}
|
||||
}
|
||||
@@ -126,7 +126,7 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
|
||||
|
||||
self::checkInstall();
|
||||
|
||||
self::$apiserver = 'https://acme-v0' . \Froxlor\Settings::Get('system.leapiversion') . '.api.letsencrypt.org/directory';
|
||||
self::$apiserver = 'https://acme-'.(Settings::Get('system.letsencryptca') == 'testing' ? 'staging-' : '').'v0' . \Froxlor\Settings::Get('system.leapiversion') . '.api.letsencrypt.org/directory';
|
||||
|
||||
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_INFO, "Requesting/renewing Let's Encrypt certificates");
|
||||
|
||||
@@ -339,6 +339,9 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
|
||||
if ($force) {
|
||||
$acmesh_cmd .= " --force";
|
||||
}
|
||||
if (defined('CRON_DEBUG_FLAG')) {
|
||||
$acmesh_cmd .= " --debug";
|
||||
}
|
||||
|
||||
$acme_result = \Froxlor\FileDir::safe_exec($acmesh_cmd);
|
||||
// debug output of acme.sh run
|
||||
|
||||
@@ -432,7 +432,7 @@ class Lighttpd extends HttpConfigBase
|
||||
|
||||
protected function getVhostContent($domain, $ssl_vhost = false, $ipid = 0)
|
||||
{
|
||||
if ($ssl_vhost === true && $domain['ssl'] != '1' && $domain['ssl_redirect'] != '1') {
|
||||
if ($ssl_vhost === true && $domain['ssl'] != '1' && $domain['ssl_enabled'] != '1' && $domain['ssl_redirect'] != '1') {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ class Lighttpd extends HttpConfigBase
|
||||
$ssl_settings .= 'ssl.use-sslv2 = "disable"' . "\n";
|
||||
$ssl_settings .= 'ssl.use-sslv3 = "disable"' . "\n";
|
||||
$ssl_settings .= 'ssl.cipher-list = "' . $ssl_cipher_list . '"' . "\n";
|
||||
$ssl_settings .= 'ssl.honor-cipher-order = "enable"' . "\n";
|
||||
$ssl_settings .= 'ssl.honor-cipher-order = ' . ($domain['ssl_honorcipherorder'] == '1' ? '"enable"' : '"disable"') . "\n";
|
||||
$ssl_settings .= 'ssl.pemfile = "' . \Froxlor\FileDir::makeCorrectFile($domain['ssl_cert_file']) . '"' . "\n";
|
||||
|
||||
if ($domain['ssl_ca_file'] != '') {
|
||||
|
||||
@@ -272,6 +272,8 @@ class Nginx extends HttpConfigBase
|
||||
*/
|
||||
if ($row_ipsandports['ssl'] == '1') {
|
||||
$row_ipsandports['domain'] = Settings::Get('system.hostname');
|
||||
$row_ipsandports['ssl_honorcipherorder'] = Settings::Get('system.honorcipherorder');
|
||||
$row_ipsandports['ssl_sessiontickets'] = Settings::Get('system.sessiontickets');
|
||||
$this->nginx_data[$vhost_filename] .= $this->composeSslSettings($row_ipsandports);
|
||||
if ($row_ipsandports['ssl_specialsettings'] != '') {
|
||||
$this->nginx_data[$vhost_filename] .= $this->processSpecialConfigTemplate($row_ipsandports['ssl_specialsettings'], array(
|
||||
@@ -700,7 +702,8 @@ class Nginx extends HttpConfigBase
|
||||
// When >1.11.0: Defaults to auto, using recommended curves provided by OpenSSL.
|
||||
// see https://github.com/Froxlor/Froxlor/issues/652
|
||||
// $sslsettings .= "\t" . 'ssl_ecdh_curve secp384r1;' . "\n";
|
||||
$sslsettings .= "\t" . 'ssl_prefer_server_ciphers on;' . "\n";
|
||||
$sslsettings .= "\t" . 'ssl_prefer_server_ciphers ' . (isset($domain_or_ip['ssl_honorcipherorder']) && $domain_or_ip['ssl_honorcipherorder'] == '1' ? 'on' : 'off') . ';' . "\n";
|
||||
$sslsettings .= "\t" . 'ssl_session_tickets ' . (isset($domain_or_ip['ssl_sessiontickets']) && $domain_or_ip['ssl_sessiontickets'] == '1' ? 'on' : 'off') . ';' . "\n";
|
||||
$sslsettings .= "\t" . 'ssl_session_cache shared:SSL:10m;' . "\n";
|
||||
$sslsettings .= "\t" . 'ssl_certificate ' . \Froxlor\FileDir::makeCorrectFile($domain_or_ip['ssl_cert_file']) . ';' . "\n";
|
||||
|
||||
|
||||
@@ -137,7 +137,11 @@ class TrafficCron extends \Froxlor\Cron\FroxlorCron
|
||||
$mysqlusage_all[$row_database['customerid']] = 0;
|
||||
}
|
||||
// sum up result
|
||||
if ($mysql_usage_row) {
|
||||
$mysqlusage_all[$row_database['customerid']] += floatval($mysql_usage_row['customerusage']);
|
||||
} else {
|
||||
\Froxlor\FroxlorLogger::getInstanceOf()->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_WARNING, "Cannot get usage for database " . $row_database['databasename'] . ".");
|
||||
}
|
||||
} else {
|
||||
\Froxlor\FroxlorLogger::getInstanceOf()->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_WARNING, "Seems like the database " . $row_database['databasename'] . " had been removed manually.");
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ final class Froxlor
|
||||
{
|
||||
|
||||
// Main version variable
|
||||
const VERSION = '0.10.7';
|
||||
const VERSION = '0.10.10';
|
||||
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
const DBVERSION = '201911220';
|
||||
const DBVERSION = '201912100';
|
||||
|
||||
// Distribution branding-tag (used for Debian etc.)
|
||||
const BRANDING = '';
|
||||
|
||||
@@ -180,6 +180,20 @@ return array(
|
||||
'image' => 'icons/domain_add.png',
|
||||
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? true : false,
|
||||
'fields' => array(
|
||||
'sslenabled' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_sslenabled'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
),
|
||||
'no_ssl_available_info' => array(
|
||||
'visible' => ($ssl_ipsandports == '' ? true : false),
|
||||
'label' => 'SSL',
|
||||
@@ -356,6 +370,32 @@ return array(
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
),
|
||||
'honorcipherorder' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_honorcipherorder'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
),
|
||||
'sessiontickets' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
|
||||
'label' => $lng['admin']['domain_sessiontickets'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
@@ -212,6 +212,20 @@ return array(
|
||||
'image' => 'icons/domain_edit.png',
|
||||
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? true : false,
|
||||
'fields' => array(
|
||||
'sslenabled' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_sslenabled'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ssl_enabled']
|
||||
)
|
||||
),
|
||||
'no_ssl_available_info' => array(
|
||||
'visible' => ($ssl_ipsandports == '' ? true : false),
|
||||
'label' => 'SSL',
|
||||
@@ -290,7 +304,7 @@ return array(
|
||||
'label' => $lng['serversettings']['ssl']['ssl_protocols']['title'],
|
||||
'desc' => $lng['serversettings']['ssl']['ssl_protocols']['description'],
|
||||
'type' => 'checkbox',
|
||||
'value' => !empty($result['ssl_protocols']) ? explode(",", $result['ssl_protocols']) : explode(",", \Froxlor\Settings::Get('system.ssl_protocols')),
|
||||
'value' => ! empty($result['ssl_protocols']) ? explode(",", $result['ssl_protocols']) : explode(",", \Froxlor\Settings::Get('system.ssl_protocols')),
|
||||
'values' => array(
|
||||
array(
|
||||
'value' => 'TLSv1',
|
||||
@@ -316,14 +330,14 @@ return array(
|
||||
'label' => $lng['serversettings']['ssl']['ssl_cipher_list']['title'],
|
||||
'desc' => $lng['serversettings']['ssl']['ssl_cipher_list']['description'],
|
||||
'type' => 'text',
|
||||
'value' => !empty($result['ssl_cipher_list']) ? $result['ssl_cipher_list'] : \Froxlor\Settings::Get('system.ssl_cipher_list')
|
||||
'value' => ! empty($result['ssl_cipher_list']) ? $result['ssl_cipher_list'] : \Froxlor\Settings::Get('system.ssl_cipher_list')
|
||||
),
|
||||
'tlsv13_cipher_list' => array(
|
||||
'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') == "apache2" && \Froxlor\Settings::Get('system.apache24') == 1 ? true : false),
|
||||
'label' => $lng['serversettings']['ssl']['tlsv13_cipher_list']['title'],
|
||||
'desc' => $lng['serversettings']['ssl']['tlsv13_cipher_list']['description'],
|
||||
'type' => 'text',
|
||||
'value' => !empty($result['tlsv13_cipher_list']) ? $result['tlsv13_cipher_list'] : \Froxlor\Settings::Get('system.tlsv13_cipher_list')
|
||||
'value' => ! empty($result['tlsv13_cipher_list']) ? $result['tlsv13_cipher_list'] : \Froxlor\Settings::Get('system.tlsv13_cipher_list')
|
||||
),
|
||||
'ssl_specialsettings' => array(
|
||||
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
|
||||
@@ -401,6 +415,34 @@ return array(
|
||||
'value' => array(
|
||||
$result['ocsp_stapling']
|
||||
)
|
||||
),
|
||||
'honorcipherorder' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_honorcipherorder'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ssl_honorcipherorder']
|
||||
)
|
||||
),
|
||||
'sessiontickets' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
|
||||
'label' => $lng['admin']['domain_sessiontickets'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ssl_sessiontickets']
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
@@ -83,6 +83,19 @@ return array(
|
||||
'image' => 'icons/domain_add.png',
|
||||
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? true : false) : false,
|
||||
'fields' => array(
|
||||
'sslenabled' => array(
|
||||
'label' => $lng['admin']['domain_sslenabled'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
),
|
||||
'ssl_redirect' => array(
|
||||
'label' => $lng['domains']['ssl_redirect']['title'],
|
||||
'desc' => $lng['domains']['ssl_redirect']['description'],
|
||||
|
||||
@@ -99,6 +99,19 @@ return array(
|
||||
'image' => 'icons/domain_edit.png',
|
||||
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? (\Froxlor\Domain\Domain::domainHasSslIpPort($result['id']) ? true : false) : false) : false,
|
||||
'fields' => array(
|
||||
'sslenabled' => array(
|
||||
'label' => $lng['admin']['domain_sslenabled'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ssl_enabled']
|
||||
)
|
||||
),
|
||||
'ssl_redirect' => array(
|
||||
'label' => $lng['domains']['ssl_redirect']['title'],
|
||||
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
|
||||
|
||||
@@ -2082,3 +2082,6 @@ $lng['admin']['domain_override_tls'] = 'Override system TLS settings';
|
||||
$lng['domains']['isaliasdomainof'] = 'Is aliasdomain for %s';
|
||||
$lng['serversettings']['apply_specialsettings_default']['title'] = 'Default value for "' . $lng['admin']['specialsettingsforsubdomains'] . "' setting when editing a domain";
|
||||
$lng['serversettings']['apply_phpconfigs_default']['title'] = 'Default value for "' . $lng['admin']['phpsettingsforsubdomains'] . "' setting when editing a domain";
|
||||
$lng['admin']['domain_sslenabled'] = 'Enable usage of SSL';
|
||||
$lng['admin']['domain_honorcipherorder'] = 'Honor the (server) cipher order, default <strong>no</strong>';
|
||||
$lng['admin']['domain_sessiontickets'] = 'Enable TLS sessiontickets (RFC 5077), default <strong>yes</strong>';
|
||||
|
||||
@@ -1729,3 +1729,6 @@ $lng['admin']['domain_override_tls'] = 'Überschreibe System TLS Einstellungen';
|
||||
$lng['domains']['isaliasdomainof'] = 'Ist Aliasdomain für %s';
|
||||
$lng['serversettings']['apply_specialsettings_default']['title'] = 'Standardwert für "' . $lng['admin']['specialsettingsforsubdomains'] . "' Einstellung beim Bearbeiten einer Domain";
|
||||
$lng['serversettings']['apply_phpconfigs_default']['title'] = 'Standardwert für "' . $lng['admin']['phpsettingsforsubdomains'] . "' Einstellung beim Bearbeiten einer Domain";
|
||||
$lng['admin']['domain_sslenabled'] = 'Aktiviere Nutzung von SSL';
|
||||
$lng['admin']['domain_honorcipherorder'] = 'Bevorzuge die serverseitige Cipher Reihenfolge, Standardwert <strong>nein</strong>';
|
||||
$lng['admin']['domain_sessiontickets'] = 'Aktiviere TLS Sessiontickets (RFC 5077), Standardwert <strong>ja</strong>';
|
||||
|
||||
@@ -26,7 +26,7 @@ class DomainsTest extends TestCase
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
$data = [
|
||||
'domain' => 'test.local',
|
||||
'domain' => 'TEST.local',
|
||||
'customerid' => $customer_userdata['customerid'],
|
||||
'override_tls' => 1,
|
||||
'ssl_protocols' => array(
|
||||
|
||||
@@ -28,7 +28,7 @@ class SubDomainsTest extends TestCase
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
$data = [
|
||||
'subdomain' => 'mysub',
|
||||
'subdomain' => 'mySub',
|
||||
'domain' => 'test2.local'
|
||||
];
|
||||
$json_result = SubDomains::getLocal($customer_userdata, $data)->add();
|
||||
@@ -47,7 +47,7 @@ class SubDomainsTest extends TestCase
|
||||
$reseller_userdata['adminsession'] = 1;
|
||||
|
||||
$data = [
|
||||
'subdomain' => 'mysub2',
|
||||
'subdomain' => 'mySub2',
|
||||
'domain' => 'test2.local',
|
||||
'customerid' => 1
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user