| 910 | | **New in symfony 1.1** |
|---|
| 911 | | |
|---|
| 912 | | >**SIDEBAR** |
|---|
| 913 | | >The CSRF Filter |
|---|
| 914 | | > |
|---|
| 915 | | >If you have a closer look at the default `filters.yml` configuration file, you will see a filter named `csrf` which is not enabled by default. The CSRF filter provides protection against Cross Site Request Forgeries (http://en.wikipedia.org/wiki/Csrf). |
|---|
| 916 | | >As soon as you enable this filter, you are protected against CSRF attacks. Don't forget to customize the `secret` parameter as this is used to compute a unique token for your forms. |
|---|
| 917 | | >The CSRF filter automatically adds a hidden field called `_csrf_token` for every form before the response is sent to the browser. The token value is made of the user `session_id` and the `secret` parameter. |
|---|
| 918 | | >When a form is submitted in `POST`, the CSRF filter checks for the token value. If the token is not present or if the value is not the excepted one, it sends a `sfException` exception. |
|---|