Skip to content

Commit 5e37939

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents 552f6e0 + 2fc23db commit 5e37939

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

install/lib/update.lib.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ function prepareDBDump() {
5959

6060
system("mysqldump -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -c -t --add-drop-table --create-options --quick --result-file=existing_db.sql ".$conf['mysql']['database']);
6161
}
62+
chmod('existing_db.sql', 0400);
63+
chown('existing_db.sql', 'root');
6264

6365
/*
6466
* If we have a server with nothing in it except VE's then the database of thie server is empty.

server/lib/classes/cron.d/900-letsencrypt.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function onRunJob() {
5252

5353
$server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
5454
if(!isset($server_config['migration_mode']) || $server_config['migration_mode'] != 'y') {
55-
$letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt'));
55+
$letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt /opt/eff.org/certbot/venv/bin/certbot'));
5656
$letsencrypt = reset($letsencrypt);
5757
if(is_executable($letsencrypt)) {
5858
$version = exec($letsencrypt . ' --version 2>&1', $ret, $val);

server/lib/classes/letsencrypt.inc.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ public function request_certificates($data, $server_type = 'apache') {
250250
unset($le_domains);
251251
@unlink('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file);
252252

253+
$le_domain_count = count($temp_domains);
254+
if($le_domain_count > 100) {
255+
$temp_domains = array_splice($temp_domains, 0, 100);
256+
$app->log("There were " . $le_domain_count . " domains in the domain list. LE only supports 100, so we strip the rest.", LOGLEVEL_WARN);
257+
}
258+
253259
// generate cli format
254260
foreach($temp_domains as $temp_domain) {
255261
$cli_domain_arg .= (string) " --domains " . $temp_domain;
@@ -266,7 +272,7 @@ public function request_certificates($data, $server_type = 'apache') {
266272
$app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG);
267273
$app->log("Let's Encrypt SSL Cert domains: $cli_domain_arg", LOGLEVEL_DEBUG);
268274

269-
$letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt'));
275+
$letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt /opt/eff.org/certbot/venv/bin/certbot'));
270276
$letsencrypt = reset($letsencrypt);
271277
if(is_executable($letsencrypt)) {
272278
$letsencrypt_cmd = $letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain $cli_domain_arg --webroot-path /usr/local/ispconfig/interface/acme";

0 commit comments

Comments
 (0)