From be3ad3bd19e921a287ee832f8f02ce96c5d09801 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Tue, 20 Sep 2016 11:59:25 +0200 Subject: MKGETDIR_PROTECT_INDEX now adds an htaccess file blocking the directory index instead of adding an index.htm --- include/functions.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/functions.inc.php b/include/functions.inc.php index 10a93cb8d..219ec16d7 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -140,12 +140,12 @@ function mkgetdir($dir, $flags=MKGETDIR_DEFAULT) if( $flags&MKGETDIR_PROTECT_HTACCESS ) { $file = $dir.'/.htaccess'; - file_exists($file) or @file_put_contents( $file, 'deny from all' ); + file_exists($file) or @file_put_contents( $file, 'DENY FROM all' ); } if( $flags&MKGETDIR_PROTECT_INDEX ) { - $file = $dir.'/index.htm'; - file_exists($file) or @file_put_contents( $file, 'Not allowed!' ); + $file = $dir.'/.htaccess'; + file_exists($file) or @file_put_contents( $file, 'Options -Indexes' ); } } if ( !is_writable($dir) ) -- cgit v1.2.3