From 04960308dc8f9a1b993d2682888ae7d6ff2836b0 Mon Sep 17 00:00:00 2001 From: Palma Solutions LTD Date: Fri, 12 May 2017 08:34:16 +0200 Subject: [PATCH] fixed securetemps --- sc.php | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/sc.php b/sc.php index 0d8aa4f..1bf7aa4 100644 --- a/sc.php +++ b/sc.php @@ -191,25 +191,13 @@ Order Deny,Allow Deny from all '; - if (file_exists("wp-content")) - - { - if (file_exists("wp-content/uploads")) - { - if (is_dir("wp-content/uploads")) - { - if (file_exists("wp-content/uploads/.htaccess")) - { - echo "file exists - skipping\n" - else - $hta = fopen("wp-content/uploads/.htaccess", "w"); + foreach(glob("./*/wp-content/uploads/") as $dirname) + { + $hta = fopen($dirname."/.htaccess", "w"); fwrite($hta, $htdata); fclose($hta); } - } - } - } // system("for i in `find ../ -type d -path '*/wp-content/uploads';`; do echo $i && echo -e '".$htdata."' >> \$i/.htaccess; done"); // system("for i in `find ../ -type d -path '*/tmp'`; do echo $i && echo -e '".$htdata."' >> \$i/.htaccess; done");