$messages = array_merge(
$this->checkLogFileIsNotAccessible(),
$this->checkUploadsAreNotAccessible(),
- $this->checkDirectoriesAreNotBrowseable()
+ $this->checkDirectoriesAreNotBrowseable(),
+ $this->checkFilesAreNotPresent()
);
return $messages;
}
return $messages;
}
+
+ /**
+ * Check that some files are not present
+ *
+ * @return array of messages
+ */
+ public function checkFilesAreNotPresent() {
+ global $civicrm_root;
+
+ $messages = array();
+ $files = array(
+ "{$civicrm_root}/packages/dompdf/dompdf.php", // CRM-16005
+ );
+ foreach ($files as $file) {
+ if (file_exists($file)) {
+ $messages[] = new CRM_Utils_Check_Message(
+ 'checkFilesAreNotPresent',
+ ts('File \'%1\' presents a security risk and should be deleted.', array(1 => $file)),
+ ts('Security Warning')
+ );
+ }
+ }
+ return $messages;
+ }
+
/**
* Determine whether $url is a public, browsable listing for $dir
*