# Disabling forgery protection

**URL:** <https://www.ruby-forum.com/t/disabling-forgery-protection/137081>\
**Category:** Rails\
**Created:** [May 8, 2008, 8:02pm UTC](https://www.ruby-forum.com/t/disabling-forgery-protection/137081 "2008-05-08T20:02:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_tibs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/439d5e/32.png) [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Post date:** [May 8, 2008, 8:02pm UTC](https://www.ruby-forum.com/t/disabling-forgery-protection/137081/1 "2008-05-08T20:02:27Z")

</div>

Hi,

I have to enable batch uploads to my website with CURL and forgery  
protection in ApplicationController is standing in my way. I do use  
the restful authentication plugin and I do call login\_required on all  
actions. Should I keep forgery protection around?

Forgery protection only makes sure that the client request has  
originated from client’s session, right? Is there anything else than I  
would be missing in terms of security?

Thanks,  
Tiberiu

---

<div class="post-metadata">

**Author:** ![mr\_tibs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/439d5e/32.png) [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Post date:** [May 8, 2008, 8:29pm UTC](https://www.ruby-forum.com/t/disabling-forgery-protection/137081/2 "2008-05-08T20:29:13Z")

</div>

Somewhere near your before filters in your controller, simply type:

protect\_from\_forgery my\_action
