[TASK] Allow access to visible content within /.well-known/ directory 01/45901/4
authorCedric Ziel <cedric@cedric-ziel.com>
Thu, 14 Jan 2016 18:18:24 +0000 (19:18 +0100)
committerBenni Mack <benni@typo3.org>
Fri, 15 Jan 2016 10:32:38 +0000 (11:32 +0100)
Allow access to the visible content from within the `/.well-known/`
hidden directory. The access to all other hidden files and directories
(starting with a dot) is still blocked.

The /.well-known/ directory represents the standard (RFC 5785) path
prefix for "well-known locations", and therefore, access to its visible
content should not be blocked.

Change-Id: I533d38a12da5cae59abed4fc00d597814d28fa04
Resolves: #72712
Releases: master,7.6,6.2
Reviewed-on: https://review.typo3.org/45901
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>

index b0b4960..c1198a1 100644 (file)
@@ -282,7 +282,9 @@ AddDefaultCharset utf-8
        RewriteRule ^(vendor|typo3_src) - [F]
        RewriteRule (?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?)/ - [F]
-       # Access block for files or folders starting with a dot
+       # Block access to all hidden files and directories with the exception of
+       # the visible content from within the `/.well-known/` hidden directory (RFC 5785).
+       RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
        RewriteCond %{SCRIPT_FILENAME} -d [OR]
        RewriteCond %{SCRIPT_FILENAME} -f
        RewriteRule (?:^|/)\. - [F]