The badfiles array is missing from the elfinder_init() function, which throws an error when called in the foreach() loop.

function elfinder_init() {
  $libpath = elfinder_lib_path();

  $badpaths = array();

  foreach ($badfiles as $badfile) {
    $path = $libpath . '/' . $badfile;
    if (file_exists($path)) {
      $badpaths[] = $path;
    }
  }

  if (count($badpaths) > 0) {
    drupal_set_message(t('elFinder library directory containing features test files :files. Please remove these files to avoid security hole.', array(':files' => implode(', ', $badpaths))), 'warning');
  }
}

I pulled the following badfiles array from a previous version of this module, which seems to resolve this issue when dropped in the beginning of this function:


function elfinder_init() {
  $libpath = elfinder_lib_path();
  $badfiles = array('elfinder.html', 'elfinder.php.html', 'connectors/php/connector.php', 'php/connector.php');
 
 $badpaths = array();

  foreach ($badfiles as $badfile) { ... }
  ...
}

Comments

ph0enix’s picture

Strange. Just checked latest dev branch - $badfiles is presented in code

ph0enix’s picture

Status: Active » Closed (cannot reproduce)