fix triggering an LE CSR when changing www on a main domain
Prior to this, LE CSRs were triggered only when the wwwserveralias was changed on alias domains, but not on main domains. Fixes #526
This commit is contained in:
@@ -2027,7 +2027,15 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
} else
|
} else
|
||||||
if ($result['wwwserveralias'] != $wwwserveralias || $result['letsencrypt'] != $letsencrypt) {
|
if ($result['wwwserveralias'] != $wwwserveralias || $result['letsencrypt'] != $letsencrypt) {
|
||||||
// or when wwwserveralias or letsencrypt was changed
|
// or when wwwserveralias or letsencrypt was changed
|
||||||
|
|
||||||
triggerLetsEncryptCSRForAliasDestinationDomain($aliasdomain, $log);
|
triggerLetsEncryptCSRForAliasDestinationDomain($aliasdomain, $log);
|
||||||
|
|
||||||
|
if ($aliasdomain === 0) {
|
||||||
|
// in case the wwwserveralias is set on a main domain, $aliasdomain is 0
|
||||||
|
// --> the call just above to triggerLetsEncryptCSRForAliasDestinationDomain
|
||||||
|
// is a noop...let's repeat it with the domain id of the main domain
|
||||||
|
triggerLetsEncryptCSRForAliasDestinationDomain($id, $log);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id);
|
$log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id);
|
||||||
|
|||||||
@@ -773,7 +773,15 @@ if ($page == 'overview') {
|
|||||||
triggerLetsEncryptCSRForAliasDestinationDomain($aliasdomain, $log);
|
triggerLetsEncryptCSRForAliasDestinationDomain($aliasdomain, $log);
|
||||||
} elseif ($result['wwwserveralias'] != $wwwserveralias || $result['letsencrypt'] != $letsencrypt) {
|
} elseif ($result['wwwserveralias'] != $wwwserveralias || $result['letsencrypt'] != $letsencrypt) {
|
||||||
// or when wwwserveralias or letsencrypt was changed
|
// or when wwwserveralias or letsencrypt was changed
|
||||||
|
|
||||||
triggerLetsEncryptCSRForAliasDestinationDomain($aliasdomain, $log);
|
triggerLetsEncryptCSRForAliasDestinationDomain($aliasdomain, $log);
|
||||||
|
|
||||||
|
if ($aliasdomain === 0) {
|
||||||
|
// in case the wwwserveralias is set on a main domain, $aliasdomain is 0
|
||||||
|
// --> the call just above to triggerLetsEncryptCSRForAliasDestinationDomain
|
||||||
|
// is a noop...let's repeat it with the domain id of the main domain
|
||||||
|
triggerLetsEncryptCSRForAliasDestinationDomain($id, $log);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check whether LE has been disabled, so we remove the certificate
|
// check whether LE has been disabled, so we remove the certificate
|
||||||
|
|||||||
Reference in New Issue
Block a user