Skip to content

Commit

Permalink
fix renew-check of let's encrypt implementation, set version to 0.10.…
Browse files Browse the repository at this point in the history
…5 for bugfix release; fixes #747

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
  • Loading branch information
d00p committed Nov 1, 2019
1 parent 6cd061d commit b162324
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion install/froxlor.sql
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ opcache.interned_strings_buffer'),
('panel', 'password_special_char', '!?<>§$%+#=@'),
('panel', 'customer_hide_options', ''),
('panel', 'is_configured', '0'),
('panel', 'version', '0.10.4'),
('panel', 'version', '0.10.5'),
('panel', 'db_version', '201910200');


Expand Down
5 changes: 5 additions & 0 deletions install/updates/froxlor/0.10/update_0.10.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,3 +452,8 @@
showUpdateStep("Updating from 0.10.3 to 0.10.4", false);
\Froxlor\Froxlor::updateToVersion('0.10.4');
}

if (\Froxlor\Froxlor::isFroxlorVersion('0.10.4')) {
showUpdateStep("Updating from 0.10.4 to 0.10.5", false);
\Froxlor\Froxlor::updateToVersion('0.10.5');
}
12 changes: 9 additions & 3 deletions lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ private static function needRenew()
)
");
$customer_ssl = $certificates_stmt->fetchAll(\PDO::FETCH_ASSOC);
if (!$customer_ssl) {
$customer_ssl = array();
}

$froxlor_ssl = array();
if (Settings::Get('system.le_froxlor_enabled') == '1') {
Expand All @@ -93,6 +96,9 @@ private static function needRenew()
(`expirationdate` < DATE_ADD(NOW(), INTERVAL 30 DAY) OR `expirationdate` IS NULL)
");
$froxlor_ssl = Database::pexecute_first($froxlor_ssl_settings_stmt);
if (!$froxlor_ssl) {
$froxlor_ssl = array();
}
}

if (count($customer_ssl) > 0 || count($froxlor_ssl) > 0) {
Expand Down Expand Up @@ -178,10 +184,10 @@ public static function run($internal = false)
'id' => null
);

$froxlor_ssl = $needRenew['froxlor_ssl'];
$froxlor_ssl = $needRenew ? $needRenew['froxlor_ssl'] : array();

$cert_mode = 'issue';
if ($froxlor_ssl) {
if (count($froxlor_ssl) > 0) {
$cert_mode = 'renew';
$certrow['id'] = $froxlor_ssl['id'];
$certrow['expirationdate'] = $froxlor_ssl['expirationdate'];
Expand Down Expand Up @@ -236,7 +242,7 @@ public static function run($internal = false)
}

// customer domains
$certrows = $needRenew['customer_ssl'];
$certrows = $needRenew ? $needRenew['customer_ssl'] : array();
$cert_mode = 'issue';
foreach ($certrows as $certrow) {

Expand Down
2 changes: 1 addition & 1 deletion lib/Froxlor/Froxlor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ final class Froxlor
{

// Main version variable
const VERSION = '0.10.4';
const VERSION = '0.10.5';

// Database version (YYYYMMDDC where C is a daily counter)
const DBVERSION = '201910200';
Expand Down

0 comments on commit b162324

Please sign in to comment.