From c5c7a913f16f5ddbf4ff44d6db7bdfcd650cecaa Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 20 Apr 2016 10:43:31 -0400
Subject: [PATCH] Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1
---
server/plugins-available/nginx_plugin.inc.php | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 23bca9b..46ad174 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -219,6 +219,22 @@
$app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']);
}
+ //* Check that the SSL key is not password protected
+ if($data["new"]["ssl_action"] == 'save') {
+ if(stristr($data["new"]["ssl_key"],'Proc-Type: 4,ENCRYPTED')) {
+ $data["new"]["ssl_action"] = '';
+
+ $app->log('SSL Certificate not saved. The SSL key is encrypted.', LOGLEVEL_WARN);
+ $app->dbmaster->datalogError('SSL Certificate not saved. The SSL key is encrypted.');
+
+ /* Update the DB of the (local) Server */
+ $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']);
+
+ /* Update also the master-DB of the Server-Farm */
+ $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']);
+ }
+ }
+
//* Save a SSL certificate to disk
if($data["new"]["ssl_action"] == 'save') {
$this->ssl_certificate_changed = true;
--
Gitblit v1.9.1