예제 #1
0
 /**
  * @return bool|string
  */
 public function addProtectionWarningToOutput(OutputInterface $output)
 {
     $checker = new SuperSakeChecker();
     if ((bool) $checker->superSakeIsNotProtected()) {
         $output->writeln("\n");
         $output->writeln('<error>The supersake file is accessible by browsers</error>');
         $output->writeln('<error>Please lock down the file by either : </error>');
         $output->writeln('<comment>Adding this to your .htaccess file</comment>');
         $output->writeln($checker->htaccessContent());
         $output->writeln('<comment>Or add this to the <fileExtensions allowUnlisted="true"> section of your web.config file if you are running on iis</comment>');
         $output->writeln($checker->webconfigContent());
         $output->writeln("\n");
         $output->writeln('<comment>Or run $ `php supersake protect` to write these lines to the files</comment>');
         $output->writeln("\n");
     }
 }