KnpRadBundle icon indicating copy to clipboard operation
KnpRadBundle copied to clipboard

[Documentation] A word about _check_csrf?

Open Gregwar opened this issue 11 years ago • 2 comments

There is no mention of the _check_csrf attribute that need to be added to a route defaults (see https://github.com/KnpLabs/KnpRadBundle/blob/develop/EventListener/CsrfListener.php#L22)

Nothing here: http://rad.knplabs.com/#unsafe-methods

And nothing here: https://github.com/KnpLabs/KnpRadBundle/wiki/csrf-protected-links

Though, it looks important to ensure that the token will be checked

Gregwar avatar Nov 29 '13 14:11 Gregwar

yes, that's a missing part of the doc that is very important :/ We're working on some feature files describing very realistically the behavior:

https://github.com/KnpLabs/KnpRadBundle/blob/9351cb05257d15a189162b3ebf7a423d76a76ee5/features/csrf_protection.feature#L23

Since a code snippets worth 100 words, here they are :) It doesn't mean we should'nt update the docs. By the way, if you have time to upgrade them and provide a PR, it would be awseome :) Thanks for opening the issue!

docteurklein avatar Nov 29 '13 16:11 docteurklein

#129 should be able to addthe csrf attribute in appropriate requests.

docteurklein avatar Dec 20 '13 14:12 docteurklein