Search code examples
ruby-on-railssecuritycookiestore

How easy is it to crack a cookie created by CookieStore from a Rails app?


I have read a bunch of stuff saying that one con of using the cookie store in a Rails app is that the client can see the cookie data. However, I looked at the cookie data and it is encrypted. Is it relatively easy to decrypt the cookie data?


Solution

  • The default cookie store in Rails isn't encrypted, it's Base64 encoded. Base64 encoding is simply a way to represent binary data in ASCII, and should not be thought of as "encryption" by any stretch of the imagination; anyone can decode it.