Skip to content

Commit efe7d9c

Browse files
author
Marius Burkard
committed
Do not use ssl_domain for LE, fixes #4302
1 parent 9351d5e commit efe7d9c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,7 @@ function update($event_name, $data) {
11581158
$vhost_data['ssl_bundle_file'] = $bundle_file;
11591159

11601160
if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y') {
1161+
$domain = $data['new']['domain'];
11611162
if(substr($domain, 0, 2) === '*.') {
11621163
// wildcard domain not yet supported by letsencrypt!
11631164
$app->log('Wildcard domains not yet supported by letsencrypt, so changing ' . $domain . ' to ' . substr($domain, 2), LOGLEVEL_WARN);
@@ -2087,8 +2088,7 @@ function delete($event_name, $data) {
20872088

20882089
// remove letsencrypt if it exists (renew will always fail otherwise)
20892090

2090-
$old_domain = $data['old']['ssl_domain'];
2091-
if(!$old_domain) $old_domain = $data['old']['domain'];
2091+
$old_domain = $data['old']['domain'];
20922092
if(substr($old_domain, 0, 2) === '*.') {
20932093
// wildcard domain not yet supported by letsencrypt!
20942094
$old_domain = substr($old_domain, 2);

server/plugins-available/nginx_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,7 @@ function update($event_name, $data) {
12301230
$tpl->setVar('ssl_letsencrypt', "n");
12311231

12321232
if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y') {
1233+
$domain = $data['new']['domain'];
12331234
if(substr($domain, 0, 2) === '*.') {
12341235
// wildcard domain not yet supported by letsencrypt!
12351236
$app->log('Wildcard domains not yet supported by letsencrypt, so changing ' . $domain . ' to ' . substr($domain, 2), LOGLEVEL_WARN);
@@ -2118,8 +2119,7 @@ function delete($event_name, $data) {
21182119

21192120
// remove letsencrypt if it exists (renew will always fail otherwise)
21202121

2121-
$old_domain = $data['old']['ssl_domain'];
2122-
if(!$old_domain) $old_domain = $data['old']['domain'];
2122+
$old_domain = $data['old']['domain'];
21232123
if(substr($old_domain, 0, 2) === '*.') {
21242124
// wildcard domain not yet supported by letsencrypt!
21252125
$old_domain = substr($old_domain, 2);

0 commit comments

Comments
 (0)