Closed (fixed)
Project:
Hostmaster (Aegir)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
22 Nov 2013 at 09:09 UTC
Updated:
11 Dec 2013 at 01:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
helmo commentedComment #2
helmo commentedThe suggested template was expanded in https://security.drupal.org/node/81938#comment-54833 which still needed to be added to the aegir patch.
Here's the update.
I've also added unlink statements in _provision_drupal_ensure_htaccess_update to prevent the chmod warnings.....
Comment #3
helmo commentedI've updated the code some more to mimic the code from core's hook_requirements().
We now check the htaccess contents before overwriting and explicitly sync it to slave servers.
The hosting patch has been updated to match the hook_update_n number.
Comment #4
helmo commentedThe provision code needed a bit more cleanup.
Comment #5
anarcat commentedWhy do we actually need to hack the files/.htaccess file? It's not actually used or deployed by Aegir in the first place, is it?
Comment #6
helmo commentedYes it feels silly. But the hook_requirements added to core will show an error on the admin status page until the file is updated.
Comment #7
omega8cc commentedYeah, core should be smarter than that. It again ignores also the fact than Nginx doesn't use .htaccess, like in Aegir in general, so we have hacked that stupid core like this:
They should really improve this and simply skip this warning if there is non-Apache server discovered, at least. I'm going to submit a patch for core, I think.
Comment #8
anarcat commentedYeah, good idea. Better than trying every webserver out there, core should actually make an AJAX request to see if the files directory is accessible directly, instead of second-guessing...
Please do refer to the core issue when/if you create it!
Comment #9
omega8cc commentedTurns out there was already such issue in the core queue, so I have submitted patches for D6, D7 and D8 there: #1559116: Make core aware of Nginx and PHP-FPM to avoid confusing alerts
Of course it still doesn't help when Apache is used, but with .htaccess support disabled, like it is in Aegir by default. Should be a separate issue in core, I guess.
Yep, running real test (like backup_migrate does) instead of just web server identity checks (like: what if Nginx is masked as Apache to satisfy Drupal core assumptions related to upload progress support?) would be much better in this case.
Comment #10
anarcat commentedpatches applied.