How to protect from XSS/SQL attacks with Phalcon? Could you please give some examples?
For example, with the action show
of the controller ofArticles
, I want to display an article:
https://www.a.com/articles/show/1
:
class ArticlesController extends Controller
{
public function showAction($id)
{
$art = Articles::findFirstById($id);
....
}
}
Is it necessary to filter the param $id
? or Phalcon just has filtered for us?
Could you please give some more examples?