Add data filtering for HTTP_REFERER and HTTP_USER_AGENT
This commit is contained in:
parent
0aea6cee01
commit
635f0ee4df
3 changed files with 6 additions and 3 deletions
|
@ -64,7 +64,7 @@ class Auth extends Page
|
|||
$this->fIswev = $v->getErrors();
|
||||
}
|
||||
|
||||
$ref = $_SERVER['HTTP_REFERER'] ?? '';
|
||||
$ref = $this->c->Secury->replInvalidChars($_SERVER['HTTP_REFERER'] ?? '');
|
||||
|
||||
$this->fIndex = 'login';
|
||||
$this->nameTpl = 'login';
|
||||
|
|
|
@ -46,7 +46,10 @@ class Email extends Page
|
|||
}
|
||||
|
||||
$data = [
|
||||
'redirect' => $this->c->Router->validate($_SERVER['HTTP_REFERER'] ?? '', 'Index'),
|
||||
'redirect' => $this->c->Router->validate(
|
||||
$this->c->Secury->replInvalidChars($_SERVER['HTTP_REFERER'] ?? ''),
|
||||
'Index'
|
||||
),
|
||||
];
|
||||
|
||||
if ('POST' === $method) {
|
||||
|
|
|
@ -117,7 +117,7 @@ class Current extends Action
|
|||
*/
|
||||
protected function getUserAgent(): string
|
||||
{
|
||||
return \trim($_SERVER['HTTP_USER_AGENT'] ?? '');
|
||||
return \trim($this->c->Secury->replInvalidChars($_SERVER['HTTP_USER_AGENT'] ?? ''));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue