File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 1
- Deny from all
1
+ <IfModule mod_version.c >
2
+ <IfVersion < 2.4 >
3
+ Deny from All
4
+ </IfVersion >
5
+ <IfVersion >= 2.4 >
6
+ Require all denied
7
+ </IfVersion >
8
+ </IfModule >
9
+ <IfModule !mod_version.c >
10
+ <IfModule !mod_authz_core.c >
11
+ Deny from all
12
+ </IfModule >
13
+ <IfModule mod_authz_core.c >
14
+ Require all denied
15
+ </IfModule >
16
+ </IfModule >
17
+ <IfModule mod_autoindex.c >
18
+ Options -Indexes
19
+ </ifModule>
Original file line number Diff line number Diff line change 16
16
define ('APP_VERSION_ROOT_PATH ' , APP_INDEX_ROOT_PATH .'rainloop/v/ ' .APP_VERSION .'/ ' );
17
17
18
18
define ('APP_USE_APC_CACHE ' , true );
19
- define ('APP_DEFAULT_DENY_ALL_HTACCESS ' , "Deny from all \n<IfModule mod_autoindex.c> \nOptions -Indexes \n</ifModule> " );
19
+ define ('APP_DEFAULT_DENY_ALL_HTACCESS ' , @file_exists (APP_VERSION_ROOT_PATH .'app/.htaccess ' ) ?
20
+ @file_get_contents (APP_VERSION_ROOT_PATH .'app/.htaccess ' ) : '' );
20
21
21
22
if (function_exists ('date_default_timezone_set ' ))
22
23
{
150
151
@file_put_contents (APP_DATA_FOLDER_PATH .'VERSION ' , APP_VERSION );
151
152
@file_put_contents (APP_DATA_FOLDER_PATH .'index.html ' , 'Forbidden ' );
152
153
@file_put_contents (APP_DATA_FOLDER_PATH .'index.php ' , 'Forbidden ' );
153
- @file_put_contents (APP_DATA_FOLDER_PATH .'.htaccess ' , APP_DEFAULT_DENY_ALL_HTACCESS );
154
+ if (0 < strlen (APP_DEFAULT_DENY_ALL_HTACCESS )) {
155
+ @file_put_contents (APP_DATA_FOLDER_PATH .'.htaccess ' , APP_DEFAULT_DENY_ALL_HTACCESS );
156
+ }
154
157
155
158
if (!@is_dir (APP_PRIVATE_DATA ))
156
159
{
You can’t perform that action at this time.
0 commit comments