mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
Merge pull request #220 from thoutenbos/master
Cleanup SSL certificate tempfiles
This commit is contained in:
commit
2ce079b9bf
1 changed files with 30 additions and 0 deletions
|
@ -280,6 +280,21 @@ if (!empty($_POST['save'])) {
|
|||
$v_ssl_crt = $_POST['v_ssl_crt'];
|
||||
$v_ssl_key = $_POST['v_ssl_key'];
|
||||
$v_ssl_ca = $_POST['v_ssl_ca'];
|
||||
|
||||
// Cleanup certificate tempfiles
|
||||
if (!empty($_POST['v_ssl_crt'])) {
|
||||
unlink($tmpdir."/".$_POST['v_domain'].".crt");
|
||||
}
|
||||
|
||||
if (!empty($_POST['v_ssl_key'])) {
|
||||
unlink($tmpdir."/".$_POST['v_domain'].".key");
|
||||
}
|
||||
|
||||
if (!empty($_POST['v_ssl_ca'])) {
|
||||
unlink($tmpdir."/".$_POST['v_domain'].".ca");
|
||||
}
|
||||
|
||||
rmdir($tmpdir);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -332,6 +347,21 @@ if (!empty($_POST['save'])) {
|
|||
$v_ssl_key = $_POST['v_ssl_key'];
|
||||
$v_ssl_ca = $_POST['v_ssl_ca'];
|
||||
$v_ssl_home = $_POST['v_ssl_home'];
|
||||
|
||||
// Cleanup certificate tempfiles
|
||||
if (!empty($_POST['v_ssl_crt'])) {
|
||||
unlink($tmpdir."/".$_POST['v_domain'].".crt");
|
||||
}
|
||||
|
||||
if (!empty($_POST['v_ssl_key'])) {
|
||||
unlink($tmpdir."/".$_POST['v_domain'].".key");
|
||||
}
|
||||
|
||||
if (!empty($_POST['v_ssl_ca'])) {
|
||||
unlink($tmpdir."/".$_POST['v_domain'].".ca");
|
||||
}
|
||||
|
||||
rmdir($tmpdir);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue