Closed (fixed)
Project:
Module Filter
Version:
7.x-1.7
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2012 at 16:37 UTC
Updated:
27 Oct 2013 at 06:31 UTC
The Paranoia module removes the php module, and itself, from the module list as a way to harden the site.
While the correct form alter hook still gets invoked, paranoia_form_system_modules_alter, the modules are shown in the list anyway.
It would be awesome if MF could not override Paranoia. :)
Comments
Comment #1
greenskin commentedHmm, Module Filter shouldn't affect that. The module simply themes the form. If Paranoia's form alter is in fact running, the module should be unset and not ever seen by Module Filter.
Comment #2
Letharion commentedI tried to add a dpm in the hook_alter. Loaded the module page, examined the output, ran
drush dis module_filter -y(which didn't disable any other modules), and re-examined the same url.The problem is that with MF turned on, the entire array is flattened, so that all modules are a the top level, whereas without MF, the module categories are top level, and the modules themselves are a level deeper.
Paranoia "fails", because the level
$packageon line 22 in the link from the OP, doesn't exist anymore.Without digging very deeply, I'm assuming the flattening happens in module filters own hook_form_system_modules_alter.
Comment #3
greenskin commentedAhh, you are correct. I was evaluating the 2.x branch rather than the 1.x. The 2.x branch does not restructure the form array. Changing the weight of either module should remedy the issue, allowing Paranoia to alter the form before Module Filter. This should be tasked to Module Filter.
Comment #4
gregglesI guess M comes before P :)
Maybe MF could get a weight of 1?
Comment #5
Letharion commentedThat would probably be an excellent workaround, all though for myself, I will probably try the 2.x branch first and hope it works. :)
Crosslinking to a relevant paranoia issue: #1813590: Block the enabling of the PHP module in an admin/modules form validation function.
Comment #6
greenskin commentedLooks like this has been fixed from Paranoia's side.