for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace devtoolboxuk\cerberus\Wrappers;
/**
*
* Detect if XSS has been passed through
* Class XssWrapper
* @package devtoolboxuk\cerberus\Wrappers
*/
class XssWrapper extends Base
{
public function process()
$this->initWrapper($this->setLocalName());
$xss = $this->soteria->xss(true);
$xss->clean($this->getReference());
if (!$xss->result()->isValid()) {
$this->setScore($this->getRealScore());
$this->setOutput($xss->result()->getOutput());
}
$this->setResult();
private function setLocalName()
$name = str_replace(__NAMESPACE__ . '\\', '', __CLASS__);
return str_replace('Wrapper', '', $name);