File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 280280 $ v_ssl_crt = $ _POST ['v_ssl_crt ' ];
281281 $ v_ssl_key = $ _POST ['v_ssl_key ' ];
282282 $ v_ssl_ca = $ _POST ['v_ssl_ca ' ];
283+
284+ // Cleanup certificate tempfiles
285+ if (!empty ($ _POST ['v_ssl_crt ' ])) {
286+ unlink ($ tmpdir ."/ " .$ _POST ['v_domain ' ].".crt " );
287+ }
288+
289+ if (!empty ($ _POST ['v_ssl_key ' ])) {
290+ unlink ($ tmpdir ."/ " .$ _POST ['v_domain ' ].".key " );
291+ }
292+
293+ if (!empty ($ _POST ['v_ssl_ca ' ])) {
294+ unlink ($ tmpdir ."/ " .$ _POST ['v_domain ' ].".ca " );
295+ }
296+
297+ rmdir ($ tmpdir );
283298 }
284299 }
285300
332347 $ v_ssl_key = $ _POST ['v_ssl_key ' ];
333348 $ v_ssl_ca = $ _POST ['v_ssl_ca ' ];
334349 $ v_ssl_home = $ _POST ['v_ssl_home ' ];
350+
351+ // Cleanup certificate tempfiles
352+ if (!empty ($ _POST ['v_ssl_crt ' ])) {
353+ unlink ($ tmpdir ."/ " .$ _POST ['v_domain ' ].".crt " );
354+ }
355+
356+ if (!empty ($ _POST ['v_ssl_key ' ])) {
357+ unlink ($ tmpdir ."/ " .$ _POST ['v_domain ' ].".key " );
358+ }
359+
360+ if (!empty ($ _POST ['v_ssl_ca ' ])) {
361+ unlink ($ tmpdir ."/ " .$ _POST ['v_domain ' ].".ca " );
362+ }
363+
364+ rmdir ($ tmpdir );
335365 }
336366 }
337367
You can’t perform that action at this time.
0 commit comments