5 class UserAgent extends \Rsi\Fred\Security\Check{
9 public function check($expected =
false){
10 $user_agent = preg_replace(
'/\\d+/',
'*',$this->
component(
'client')->userAgent);
11 if(preg_match(
'/(' . implode(
'|',$this->illegal) .
')/i',$user_agent))
return false;
12 $orig = $this->session->userAgent;
13 if($orig !== null)
return $user_agent === $orig;
14 $this->session->userAgent = $user_agent;
$illegal
Array containing illegal characters / snippets (reg-ex).
component($name)
Get a component (local or default).