I'm looking at the Phalcon\Http\Request class. The methods getPost(), getQuery(), etc. all accept a second argument called $filters that allows me to sanitize user input like this:
$username = $this->request->getPost('username', 'alphanum');
But then the method getServer() doesn't accept a second argument. Does that mean that it internally sanitizes the $_SERVER variables? If not, then I will have to do it manually like this:
$userAgent = $this->request->getServer('HTTP_USER_AGENT');
$userAgent = $this->filter->sanitize($userAgent, 'string');