Till Brehm
2016-04-20 bff9826960ebd8237c9bcbca68c16013cff50024
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;