This is currently insecure by default. PHP code shouldn't really be hiding in the UI of any Drupal site, but if we're going to maintain support for it, let's at least make sure it requires the presence of the generally disapproved PHP Filter module to use.
Comments
Comment #2
nicholas.alipaz commentedI am personally against the need for PHP filter to enable the option for PHP based conditions. The reason being is like you said, PHP in the database is insecure by default. Making the users enable it on the site opens up the rest of the site to the possibility of it being enabled elsewhere (can of worms). Better to leave it a alone in my opinion, not to mention the difficulty in making users enable and configure the PHP filter to continue with upgrade to the next iteration of this module. Sounds like a major change with possibility of breaking existing functionality for current users.
Comment #3
rszrama commentedOk, I'll remove the capability entirely in a 2.x branch.
Comment #4
rszrama commentedNote: when I do so, I'll also add a hook into the page visibility settings check so custom PHP can still be used to enable the JavaScript.
Comment #5
rszrama commentedlol, in fact, the module currently only evaluates the PHP if the PHP module is enabled, meaning the settings form's PHP option wouldn't work anyways. I think that might mean no one's using this feature. ; )
Comment #6
rszrama commentedGiven the current behavior of the module is to only evaluate PHP if the PHP Filter module is enabled, I'm going to add the same check to the settings form. That seems to be the safest way to resolve the conflict (as opposed to simply removing the module_exists() check in the visibility code, which would turn on who knows what code in sites that were trying to use it before). I'll spawn a follow-up issue for removing this in 2.x.
Comment #7
rszrama commentedDerp, forgot patch.
Comment #8
rszrama commentedOk, committed.
Comment #11
nicholas.alipaz commentedGood sleuthing, I agree whole-heartedly with your plans.