Closed (won't fix)
Project:
Drush Cleanup
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Jun 2010 at 09:59 UTC
Updated:
20 Aug 2010 at 18:24 UTC
Hi, great idea for a module.
Here is how we do it in my company:
# protect .txt files from exposing info about the drupal version and close the DoS attack vector towards cron.php
# Also defend update.php / install.php
<LocationMatch ^/(cron)\.php$|^/[A-Z][A-Za-z.]*\.txt$>
Order deny,allow
Deny from all
Allow from 127.0.0.1
ErrorDocument 403 "Good day! You do not have access to this resource. (error 403). If you think that you should have access - email us at office AT velko.org<br />Back to <a href=\"http://velko.org\">velko.org</a>"
</LocationMatch>
Why not make your drush command ask what to do and output this text as an option?
Possibly drupal-core version aware and updated with more file definitions - like the READMe-s not in the drupal root...
Thanks for the follow-up - if you do.
Comments
Comment #1
abaddon commentedan apache upgrade can cause htaccess to fail and expose sensitive stuff, a failure could be provoked, i use the above too when im lazy, when im not i rm-rf every test, readme, and extra files not needed for the site to function
Comment #2
Chris CharltonThanks for the feedback.
I think cleaning out the files versus hiding them is an administration preference. Both solutions are good. Others have debated heavily over even the fact if hiding the files is really a security practice or a false sense of security, and while I don't want to spark that debate here I always think Drush & Drupal is happy to take new contribs that satisfy each method/preference.
@rsvelko - Your idea would be best as another plug-in, or as a add-on to maybe something like a Security Report module that may already exist.
@abaddon - You mention you clean out the tests too, if I added a tests folder cleanup argument to this command I would require a Y/N prompt since someone may name a folder "tests" for something else and I wipe out that folder, which would suck for them. No undos.
@EVERYONE - Any interest in seeing this plug-in clean out the README.txt, LICENSE.txt, & INSTALL.txt files from contrib modules/themes?
Comment #3
Chris Charlton