Author: Gawain Lynch (gawain.lynch@gmail.com)
示例#1
0
文件: MagicQuotes.php 项目: bolt/bolt
 /**
  * {@inheritdoc}
  */
 public function check(ExceptionControllerInterface $exceptionController)
 {
     if (get_magic_quotes_gpc()) {
         return $exceptionController->systemCheck(Validator::CHECK_MAGIC_QUOTES);
     }
     return null;
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function check(ExceptionControllerInterface $exceptionController)
 {
     $exceptions = $this->config->getExceptions();
     if ($exceptions === null) {
         return null;
     }
     return $exceptionController->systemCheck(Validator::CHECK_CONFIG, $exceptions);
 }
示例#3
0
文件: Cache.php 项目: bolt/bolt
 /**
  * {@inheritdoc}
  */
 public function check(ExceptionControllerInterface $exceptionController)
 {
     $path = $this->resourceManager->getPath('cache');
     if (!is_dir($path)) {
         return $exceptionController->systemCheck(Validator::CHECK_CACHE, [], ['path' => $path]);
     }
     if (!is_writable($path)) {
         return $exceptionController->systemCheck(Validator::CHECK_CACHE, [], ['path' => $path]);
     }
     return null;
 }
示例#4
0
文件: SafeMode.php 项目: bolt/bolt
 /**
  * {@inheritdoc}
  */
 public function check(ExceptionControllerInterface $exceptionController)
 {
     $safeMode = ini_get('safe_mode');
     if (is_string($safeMode)) {
         $safeMode = $safeMode == '1' || strtolower($safeMode) === 'on' ? 1 : 0;
     }
     if ($safeMode) {
         return $exceptionController->systemCheck(Validator::CHECK_SAFE_MODE);
     }
     return null;
 }
示例#5
0
文件: Apache.php 项目: nbehier/bolt
 /**
  * This check looks for the presence of the .htaccess file inside the web directory.
  * It is here only as a convenience check for users that install the basic version of Bolt.
  *
  * If you see this error and want to disable it, call $config->getVerifier()->disableApacheChecks();
  * inside your bootstrap.php file, just before the call to $config->verify().
  *
  * {@inheritdoc}
  */
 public function check(ExceptionControllerInterface $exceptionController)
 {
     $request = Request::createFromGlobals();
     $serverSoftware = $request->server->get('SERVER_SOFTWARE', '');
     $isApache = strpos($serverSoftware, 'Apache') !== false;
     if ($this->resourceManager->getVerifier()->disableApacheChecks === true || !$isApache) {
         return null;
     }
     $path = $this->resourceManager->getPath('web/.htaccess');
     if (is_readable($path)) {
         return null;
     }
     return $exceptionController->systemCheck(Validator::CHECK_APACHE);
 }