.htaccess: Deny access to CHANGELOG.md, composer.json, composer.lock

See discussion in #343
This commit is contained in:
Daniel Rudolf 2016-04-27 21:02:20 +02:00
parent 749114df61
commit ee5b4f0d56
No known key found for this signature in database
GPG key ID: A061F02CD8DE4538
2 changed files with 4 additions and 2 deletions

View file

@ -5,7 +5,8 @@
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
RewriteRule ^(.git|config|content|content-sample|lib|vendor)/.*$ index.php?$0 [L,QSA]
RewriteRule ^(\.git|config|content|content-sample|lib|vendor)(/.*)?$ index.php?$0 [L,QSA]
RewriteRule ^(CHANGELOG.md|composer.(json|lock)) index.php?404 [L]
<IfModule mod_env.c>
SetEnv PICO_URL_REWRITING 1

View file

@ -8,7 +8,8 @@ Released: -
* [Changed] Improve documentation
* [Changed] Add CSS rules for definition lists to default theme
* [Changed] Always use `on404Content...` execution path when serving a `404.md`
* [Changed] Deny access to `.git` directory (`.htaccess` file)
* [Changed] Deny access to `.git` directory, `CHANGELOG.md`, `composer.json`
and `composer.lock` (`.htaccess` file)
* [Changed] Use Pico's `404.md` to deny access to `.git`, `config`, `content`,
* `content-sample`, `lib` and `vendor` dirs (`.htaccess` file)
* [Fixed] #342: Fix responsiveness in default theme