tbrehm
2013-06-18 359a6b03d0a266d59c31a20f84798c49654df271
Fixed: FS#3008 - Insecure permissions on SSL Key Files when key is created outside of ispconfig
2 files modified
2 ■■■■■ changed files
server/plugins-available/apache2_plugin.inc.php 1 ●●●● patch | view | raw | blame | history
server/plugins-available/nginx_plugin.inc.php 1 ●●●● patch | view | raw | blame | history
server/plugins-available/apache2_plugin.inc.php
@@ -247,6 +247,7 @@
            //* Write the key file, if field is empty then import the key into the db
            if(trim($data["new"]["ssl_key"]) != '') {
                $app->system->file_put_contents($key_file2,$data["new"]["ssl_key"]);
                $app->system->chmod($key_file2,0400);
            } else {
                $ssl_key2 = $app->db->quote($app->system->file_get_contents($key_file2));
                /* Update the DB of the (local) Server */
server/plugins-available/nginx_plugin.inc.php
@@ -243,6 +243,7 @@
            if(trim($data["new"]["ssl_cert"]) != '') $app->system->file_put_contents($crt_file,$data["new"]["ssl_cert"]);
            //if(trim($data["new"]["ssl_bundle"]) != '') $app->system->file_put_contents($bundle_file,$data["new"]["ssl_bundle"]);
            if(trim($data["new"]["ssl_key"]) != '') $app->system->file_put_contents($key_file2,$data["new"]["ssl_key"]);
            $app->system->chmod($key_file2,0400);
            
            // for nginx, bundle files have to be appended to the certificate file
            if(trim($data["new"]["ssl_bundle"]) != ''){