Skip to content

Commit 0650de9

Browse files
committed
[ticket/16556] Remove purposeless <Files "*"> from .htaccess
Wrapping access permissions into <Files "*"> at best has zero effect and implies unnecessary code and parsing for the web server. At least it does not block access to files only, but still denies auto indexing and access to sub directories effectively as well. But removing this directive is still the cleaner and safer way to deny access to any kind of resource that is provided within the directory in question. To deny access to migration data, a single .htaccess file can be used. This reduces the effort for future changes and it is not required anymore to create new .htaccess files for every new migration directory. Additionally this corrects the fact the "Require" is part of "mod_authz_core", not "mod_authz_host". PHPBB3-16556 Signed-off-by: MichaIng <micha@dietpi.com>
1 parent 206ac70 commit 0650de9

File tree

7 files changed

+7
-213
lines changed

7 files changed

+7
-213
lines changed
Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,25 @@
11
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
22
# module mod_authz_host to a new module called mod_access_compat (which may be
3-
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
3+
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
44
# We could just conditionally provide both versions, but unfortunately Apache
55
# does not explicitly tell us its version if the module mod_version is not
66
# available. In this case, we check for the availability of module
77
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
88
<IfModule mod_version.c>
99
<IfVersion < 2.4>
10-
<Files "*">
11-
Order Allow,Deny
12-
Deny from All
13-
</Files>
10+
Order Allow,Deny
11+
Deny from All
1412
</IfVersion>
1513
<IfVersion >= 2.4>
16-
<Files "*">
17-
Require all denied
18-
</Files>
14+
Require all denied
1915
</IfVersion>
2016
</IfModule>
2117
<IfModule !mod_version.c>
2218
<IfModule !mod_authz_core.c>
23-
<Files "*">
24-
Order Allow,Deny
25-
Deny from All
26-
</Files>
19+
Order Allow,Deny
20+
Deny from All
2721
</IfModule>
2822
<IfModule mod_authz_core.c>
29-
<Files "*">
30-
Require all denied
31-
</Files>
23+
Require all denied
3224
</IfModule>
3325
</IfModule>

db/migration/data/v310/.htaccess

Lines changed: 0 additions & 33 deletions
This file was deleted.

db/migration/data/v31x/.htaccess

Lines changed: 0 additions & 33 deletions
This file was deleted.

db/migration/data/v320/.htaccess

Lines changed: 0 additions & 33 deletions
This file was deleted.

db/migration/data/v32x/.htaccess

Lines changed: 0 additions & 33 deletions
This file was deleted.

db/migration/data/v330/.htaccess

Lines changed: 0 additions & 33 deletions
This file was deleted.

db/migration/data/v33x/.htaccess

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)