Exemplo n.º 1
0
 /**
  * @param wfWAFRule $rule
  * @param wfWAFRuleComparisonFailure $failedComparison
  * @param bool $updateFailedRules
  * @throws wfWAFBlockXSSException
  */
 public function blockXSS($rule, $failedComparison, $updateFailedRules = true)
 {
     $paramKey = $failedComparison->getParamKey();
     $category = $rule->getCategory();
     if ($updateFailedRules) {
         $this->failedRules[$paramKey][$category][] = array('rule' => $rule, 'failedComparison' => $failedComparison, 'action' => 'blockXSS');
     }
     $e = new wfWAFBlockXSSException();
     $e->setFailedRules(array($rule));
     $e->setParamKey($failedComparison->getParamKey());
     $e->setParamValue($failedComparison->getParamValue());
     $e->setRequest($this->getRequest());
     throw $e;
 }