Skip to content

Commit 7a7ba27

Browse files
author
Till Brehm
committed
Fixed #5099 letsencrypt bug on multihost system
1 parent 71e4f82 commit 7a7ba27

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ function update($event_name, $data) {
12201220
/* Update the DB of the (local) Server */
12211221
$app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']);
12221222
/* Update also the master-DB of the Server-Farm */
1223-
$app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']);
1223+
$app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ? AND `server_id` = ?", $data['new']['ssl'], 'n', $data['new']['domain'], $conf['server_id']);
12241224
}
12251225
}
12261226

server/plugins-available/nginx_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ function update($event_name, $data) {
12981298
$data['new']['ssl_letsencrypt'] = 'n';
12991299
if($data['old']['ssl'] == 'n') $data['new']['ssl'] = 'n';
13001300
/* Update the DB of the (local) Server */
1301-
$app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']);
1301+
$app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ? AND `server_id` = ?", $data['new']['ssl'], 'n', $data['new']['domain'], $conf['server_id']);
13021302
/* Update also the master-DB of the Server-Farm */
13031303
$app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']);
13041304
}

0 commit comments

Comments
 (0)