Beispiel #1
0
 protected function processSecurity()
 {
     $this->auth = CMSAuth::getInstance();
     // ignore security settings in command line mode
     if ($this->dispatcher->getRequest() instanceof \Faid\Request\CommandLineRequest) {
         return;
     }
     if (self::isUnitTestsRunning()) {
         return;
     }
     \Trace::addMessage('CMS', 'Проверка безопасности');
     if ($this->dispatcher->getRequest() instanceof Request) {
         $this->dispatcher->getRequest()->testForInjections();
         $this->dispatchGranted = $this->showAuthScreenIfNecessary();
     }
     \Extasy\Audit\DDosDetector::detect();
 }
Beispiel #2
0
 public function testGetRequest()
 {
     $request = new Request(array('phrase1' => 'Hello', 'phrase2' => 'World'));
     $dispatcher = new Dispatcher($request);
     $this->assertEquals($request, $dispatcher->getRequest());
 }