cron/LE: fix superfluous CSRs
Depending on the data present, the LE cronscript may cause multiple entries per domain in domain_ssl_settings. This is due to $updcert_stmt interfering with the outer loop while ($certrow = $stmt->fetch()): PDO's DB cursor sees rows newly created by $updcert_stmt within the loop. As a consequence this also leads to superfluous CSRs, thus increasing the certificate limit counter on the LE side. Solution: manifest the result of @$certificates_stmt@ on the PHP side in its entirety prior to entering the outer loop.
This commit is contained in:
@@ -36,7 +36,8 @@ $upddom_stmt = Database::prepare("
|
|||||||
");
|
");
|
||||||
|
|
||||||
$changedetected = 0;
|
$changedetected = 0;
|
||||||
while ($certrow = $certificates_stmt->fetch(PDO::FETCH_ASSOC)) {
|
$certrows = $certificates_stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
foreach($certrows AS $certrow) {
|
||||||
|
|
||||||
// set logger to corresponding loginname for the log to appear in the users system-log
|
// set logger to corresponding loginname for the log to appear in the users system-log
|
||||||
$cronlog = FroxlorLogger::getInstanceOf(array('loginname' => $certrow['loginname']));
|
$cronlog = FroxlorLogger::getInstanceOf(array('loginname' => $certrow['loginname']));
|
||||||
|
|||||||
Reference in New Issue
Block a user