File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 197197 exec (HESTIA_CMD ."v-add-web-domain-ssl " .$ user ." " .escapeshellarg ($ v_domain )." " .$ tmpdir ." " .$ v_ssl_home ." 'no' " , $ output , $ return_var );
198198 check_return_code ($ return_var ,$ output );
199199 unset($ output );
200+
201+ // Cleanup certificate tempfiles
202+ if (!empty ($ _POST ['v_ssl_crt ' ])) unlink ($ tmpdir ."/ " .$ v_domain .".crt " );
203+ if (!empty ($ _POST ['v_ssl_key ' ])) unlink ($ tmpdir ."/ " .$ v_domain .".key " );
204+ if (!empty ($ _POST ['v_ssl_ca ' ])) unlink ($ tmpdir ."/ " .$ v_domain .".ca " );
205+ rmdir ($ tmpdir );
200206 }
201207 }
202208
Original file line number Diff line number Diff line change 509509 $ v_ssl_signature = $ ssl_str ['HESTIA ' ]['SIGNATURE ' ];
510510 $ v_ssl_pub_key = $ ssl_str ['HESTIA ' ]['PUB_KEY ' ];
511511 $ v_ssl_issuer = $ ssl_str ['HESTIA ' ]['ISSUER ' ];
512+
513+ // Cleanup certificate tempfiles
514+ if (file_exists ($ tmpdir . '/certificate.crt ' )) unlink ($ tmpdir . '/certificate.crt ' );
515+ if (file_exists ($ tmpdir . '/certificate.key ' )) unlink ($ tmpdir . '/certificate.key ' );
516+ rmdir ($ tmpdir );
512517 }
513518 }
514519
You can’t perform that action at this time.
0 commit comments