Merge remote-tracking branch 'origin/master' into 0.10.0
This commit is contained in:
@@ -690,7 +690,7 @@ opcache.interned_strings_buffer'),
|
|||||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||||
('panel', 'customer_hide_options', ''),
|
('panel', 'customer_hide_options', ''),
|
||||||
('panel', 'version', '0.10.0'),
|
('panel', 'version', '0.10.0'),
|
||||||
('panel', 'db_version', '201802210');
|
('panel', 'db_version', '201802250');
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `panel_tasks`;
|
DROP TABLE IF EXISTS `panel_tasks`;
|
||||||
@@ -1006,6 +1006,7 @@ CREATE TABLE IF NOT EXISTS `domain_ssl_settings` (
|
|||||||
`ssl_ca_file` mediumtext,
|
`ssl_ca_file` mediumtext,
|
||||||
`ssl_cert_chainfile` mediumtext,
|
`ssl_cert_chainfile` mediumtext,
|
||||||
`ssl_csr_file` mediumtext,
|
`ssl_csr_file` mediumtext,
|
||||||
|
`ssl_fullchain_file` mediumtext,
|
||||||
`expirationdate` datetime DEFAULT NULL,
|
`expirationdate` datetime DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||||
|
|||||||
@@ -22,16 +22,33 @@ if (! defined('_CRON_UPDATE')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isFroxlorVersion('0.9.39.5')) {
|
if (isFroxlorVersion('0.9.39.5')) {
|
||||||
|
|
||||||
showUpdateStep("Updating from 0.9.39.5 to 0.10.0", false);
|
showUpdateStep("Updating from 0.9.39.5 to 0.10.0", false);
|
||||||
updateToVersion('0.10.0');
|
updateToVersion('0.10.0');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isDatabaseVersion('201802150')) {
|
if (isFroxlorVersion('0.10.0')) {
|
||||||
|
showUpdateStep("Adding new api keys table");
|
||||||
|
Database::query("DROP TABLE IF EXISTS `api_keys`;");
|
||||||
|
$sql = "CREATE TABLE `api_keys` (
|
||||||
|
`id` int(11) NOT NULL auto_increment,
|
||||||
|
`adminid` int(11) NOT NULL default '0',
|
||||||
|
`customerid` int(11) NOT NULL default '0',
|
||||||
|
`apikey` varchar(500) NOT NULL default '',
|
||||||
|
`secret` varchar(500) NOT NULL default '',
|
||||||
|
`allowed_from` text NOT NULL,
|
||||||
|
`valid_until` int(15) NOT NULL default '0',
|
||||||
|
PRIMARY KEY (id),
|
||||||
|
KEY adminid (adminid),
|
||||||
|
KEY customerid (customerid)
|
||||||
|
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;";
|
||||||
|
Database::query($sql);
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
showUpdateStep("Adding new api settings");
|
||||||
|
Settings::AddNew('api.enabled', 0);
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
showUpdateStep("Adding new default-ssl-ip setting");
|
showUpdateStep("Adding new default-ssl-ip setting");
|
||||||
Settings::AddNew('system.defaultsslip', '');
|
Settings::AddNew('system.defaultsslip', '');
|
||||||
lastStepStatus(0);
|
lastStepStatus(0);
|
||||||
|
|
||||||
updateToDbVersion('201802210');
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3942,26 +3942,9 @@ if (isFroxlorVersion('0.9.39.4')) {
|
|||||||
|
|
||||||
if (isDatabaseVersion('201802130')) {
|
if (isDatabaseVersion('201802130')) {
|
||||||
|
|
||||||
showUpdateStep("Adding new api keys table");
|
showUpdateStep("Adding fullchain field to ssl certificates");
|
||||||
Database::query("DROP TABLE IF EXISTS `api_keys`;");
|
Database::query("ALTER TABLE `" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "` ADD `ssl_fullchain_file` mediumtext AFTER `ssl_csr_file`;");
|
||||||
$sql = "CREATE TABLE `api_keys` (
|
|
||||||
`id` int(11) NOT NULL auto_increment,
|
|
||||||
`adminid` int(11) NOT NULL default '0',
|
|
||||||
`customerid` int(11) NOT NULL default '0',
|
|
||||||
`apikey` varchar(500) NOT NULL default '',
|
|
||||||
`secret` varchar(500) NOT NULL default '',
|
|
||||||
`allowed_from` text NOT NULL,
|
|
||||||
`valid_until` int(15) NOT NULL default '0',
|
|
||||||
PRIMARY KEY (id),
|
|
||||||
KEY adminid (adminid),
|
|
||||||
KEY customerid (customerid)
|
|
||||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;";
|
|
||||||
Database::query($sql);
|
|
||||||
lastStepStatus(0);
|
lastStepStatus(0);
|
||||||
|
|
||||||
showUpdateStep("Adding new api settings");
|
updateToDbVersion('201802250');
|
||||||
Settings::AddNew('api.enabled', 0);
|
|
||||||
lastStepStatus(0);
|
|
||||||
|
|
||||||
updateToDbVersion('201802150');
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,6 +89,10 @@ class DomainSSL {
|
|||||||
$ssl_files['ssl_cert_chainfile'] = makeCorrectFile($sslcertpath.'/'.$domain['domain'].'_chain.pem');
|
$ssl_files['ssl_cert_chainfile'] = makeCorrectFile($sslcertpath.'/'.$domain['domain'].'_chain.pem');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// will only be generated to be used externally, froxlor does not need this
|
||||||
|
if ($dom_certs['ssl_fullchain_file'] != '') {
|
||||||
|
$ssl_files['ssl_fullchain_file'] = makeCorrectFile($sslcertpath.'/'.$domain['domain'].'_fullchain.pem');
|
||||||
|
}
|
||||||
// create them on the filesystem
|
// create them on the filesystem
|
||||||
foreach ($ssl_files as $type => $filename) {
|
foreach ($ssl_files as $type => $filename) {
|
||||||
if ($filename != '') {
|
if ($filename != '') {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
$version = '0.10.0';
|
$version = '0.10.0';
|
||||||
|
|
||||||
// Database version (YYYYMMDDC where C is a daily counter)
|
// Database version (YYYYMMDDC where C is a daily counter)
|
||||||
$dbversion = '201802210';
|
$dbversion = '201802250';
|
||||||
|
|
||||||
// Distribution branding-tag (used for Debian etc.)
|
// Distribution branding-tag (used for Debian etc.)
|
||||||
$branding = '';
|
$branding = '';
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ $certificates_stmt = Database::query("
|
|||||||
dom.`id` = domssl.`domainid`
|
dom.`id` = domssl.`domainid`
|
||||||
WHERE
|
WHERE
|
||||||
dom.`customerid` = cust.`customerid`
|
dom.`customerid` = cust.`customerid`
|
||||||
|
AND cust.deactivated = 0
|
||||||
AND dom.`letsencrypt` = 1
|
AND dom.`letsencrypt` = 1
|
||||||
AND dom.`aliasdomain` IS NULL
|
AND dom.`aliasdomain` IS NULL
|
||||||
AND dom.`iswildcarddomain` = 0
|
AND dom.`iswildcarddomain` = 0
|
||||||
@@ -92,6 +93,7 @@ $updcert_stmt = Database::prepare("
|
|||||||
`ssl_ca_file` = :ca,
|
`ssl_ca_file` = :ca,
|
||||||
`ssl_cert_chainfile` = :chain,
|
`ssl_cert_chainfile` = :chain,
|
||||||
`ssl_csr_file` = :csr,
|
`ssl_csr_file` = :csr,
|
||||||
|
`ssl_fullchain_file` = :fullchain,
|
||||||
`expirationdate` = :expirationdate
|
`expirationdate` = :expirationdate
|
||||||
");
|
");
|
||||||
|
|
||||||
@@ -182,6 +184,7 @@ if (Settings::Get('system.le_froxlor_enabled') == '1') {
|
|||||||
'ca' => $return['chain'],
|
'ca' => $return['chain'],
|
||||||
'chain' => $return['chain'],
|
'chain' => $return['chain'],
|
||||||
'csr' => $return['csr'],
|
'csr' => $return['csr'],
|
||||||
|
'fullchain' => $return['fullchain'],
|
||||||
'expirationdate' => date('Y-m-d H:i:s', $newcert['validTo_time_t'])
|
'expirationdate' => date('Y-m-d H:i:s', $newcert['validTo_time_t'])
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ $certificates_stmt = Database::query("
|
|||||||
dom.`id` = domssl.`domainid`
|
dom.`id` = domssl.`domainid`
|
||||||
WHERE
|
WHERE
|
||||||
dom.`customerid` = cust.`customerid`
|
dom.`customerid` = cust.`customerid`
|
||||||
|
AND cust.deactivated = 0
|
||||||
AND dom.`letsencrypt` = 1
|
AND dom.`letsencrypt` = 1
|
||||||
AND dom.`aliasdomain` IS NULL
|
AND dom.`aliasdomain` IS NULL
|
||||||
AND dom.`iswildcarddomain` = 0
|
AND dom.`iswildcarddomain` = 0
|
||||||
@@ -88,6 +89,7 @@ $updcert_stmt = Database::prepare("
|
|||||||
`ssl_ca_file` = :ca,
|
`ssl_ca_file` = :ca,
|
||||||
`ssl_cert_chainfile` = :chain,
|
`ssl_cert_chainfile` = :chain,
|
||||||
`ssl_csr_file` = :csr,
|
`ssl_csr_file` = :csr,
|
||||||
|
`ssl_fullchain_file` = :fullchain,
|
||||||
`expirationdate` = :expirationdate
|
`expirationdate` = :expirationdate
|
||||||
");
|
");
|
||||||
|
|
||||||
@@ -178,6 +180,7 @@ if (Settings::Get('system.le_froxlor_enabled') == '1') {
|
|||||||
'ca' => $return['chain'],
|
'ca' => $return['chain'],
|
||||||
'chain' => $return['chain'],
|
'chain' => $return['chain'],
|
||||||
'csr' => $return['csr'],
|
'csr' => $return['csr'],
|
||||||
|
'fullchain' => $return['fullchain'],
|
||||||
'expirationdate' => date('Y-m-d H:i:s', $newcert['validTo_time_t'])
|
'expirationdate' => date('Y-m-d H:i:s', $newcert['validTo_time_t'])
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user