The (non-included) elFinder library may contain example files that can be dangerous. hook_requirements() could be implemented to look for the demo code and, if found, suggest to remove that code.

This issue was reported to the security team by emmonsaza and ecrazor. It was decided that it could be fixed in public as a security improvement.

Comments

mcdruid’s picture

It looks like there's a check for these files in the module's hook_init which then calls watchdog.

As Pere Orga says, I'd have thought hook_requirements would be where this belongs; apart from anything else doing a handful of file_exists calls followed by onel to watchdog during init is not without cost.

greggles’s picture

I can see the merit of hook_init for a problem as dangerous as this. I think drupal_set_message if the user has at least one of a variety of 'admin*' permissions would also make sense.

ph0enix’s picture

Status: Active » Needs review

Improved checks. If the demo files has been found in the system there are will be watchdog and generic error message. Also this check now performing at hook_requirements so module will not enabled without removing demo files.

  • ph0enix committed 9569478 on 7.x-2.x
    Issue #2509784: Library may contain example files that can be dangerous
    

  • ph0enix committed 9920f08 on 7.x-1.x
    Issue #2509784: Library may contain example files that can be dangerous
    

  • ph0enix committed 7e9d5cb on 6.x-2.x
    Issue #2509784: Library may contain example files that can be dangerous
    

  • ph0enix committed 1e8f031 on 6.x-1.x
    Issue #2509784: Library may contain example files that can be dangerous
    

  • ph0enix committed 361decd on 8.x-2.x
    Issue #2509784: Library may contain example files that can be dangerous
    
NWOM’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.