From 389d3a552e36e52b97281f0c083631c15cf8690e Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 25 Jan 2011 10:45:52 +0100 Subject: Replaced rm_rf() by rm_tree(). Implemented recursive directory deletion in PHP properly without the use of exec(). This improves security, performance and portability and makes the code compatible with PHP's Safe Mode as well as with PHP setups that disable exec() using the "disable_functions" directive. Signed-off-by: Lukas Fleischer --- web/html/pkgsubmit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/html') diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index cdcc510..c39e2f9 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -216,7 +216,7 @@ if ($_COOKIE["AURSID"]): if (can_submit_pkg($pkg_name, $_COOKIE["AURSID"])) { if (file_exists($incoming_pkgdir)) { # Blow away the existing file/dir and contents - rm_rf($incoming_pkgdir); + rm_tree($incoming_pkgdir); } if (!@mkdir($incoming_pkgdir)) { -- cgit v1.2.3-70-g09d2