Madhvendra Thakur
Madhvendra Thakur

Reputation: 135

How to implement CSFR security enhancement with existing Grails project

How do I implement the CSFR security enhancement in my existing Grails project? I have read that I have to use token in form and modify the query string. I do not think it is best solution because in my project there are a lot of submit forms and many controllers.

Upvotes: 0

Views: 28

Answers (1)

Joshua Moore
Joshua Moore

Reputation: 24776

The fact is you are going to have to change the way you submit forms and add in the token to each of the forms and change your controllers to check the token. If you want CSFR protection you'll have to touch all of those places.

Fortunately Grails offers useToken and withForm to help take care of the implementation for you. You just have to put it in where you want it.

You can read more about this in the documentation.

Upvotes: 1

Related Questions