Fixed: FS#3008 - Insecure permissions on SSL Key Files when key is created outside of ispconfig
| | |
| | | //* 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 */ |
| | |
| | | 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"]) != ''){ |