In , .htaccess files were added to core, lang, libs, plugins, and themes to guard against directory listing and direct access to .php and .tpl files. This ascribes to the "secure by default" principle.
It addresses the potential 'information disclosure' vulnerability (i.e., script path or include path) on a misconfigured web server, and avoids the need to add "defined('PIWIK_INCLUDE_PATH') or die;" to .php files (which we started doing in , but not yet for files that contain subclasses).
Unfortunately, some are experiencing problems:
(In ) fixes #1337 - remove static .htaccess files and defined('PIWIK_INCLUDE_PATH') or die "guard"; we'll enhance PhpSecInfo to assist the user in configuring their environment more securely
(In ) refs #1337
(In ) refs #1337 - create .htaccess files at runtime (Installation); tested with Order deny,allow (and allow,deny), AllowOverride All (vs none)
(In ) refs #1337 - allow direct access to .test.php files
(In ) refs #1337 - only create .htaccess files at Installation if Apache detected. Jetty's HTAccessHandler doesn't fully support Apache .htaccess files.