Tag Archives: security

rake secret?

Bort and Restful Authentication, require you to edit the REST_AUTH_SITE_KEY. What does this mean? Rake has a ‘secret’ target which you can call; it generates a key. What about the ‘secret’ value in environment.rb? Added in Rails 2.0, as part of moving session state to the client side, this key encrypts session data. Continue reading

Posted in Development | Tagged , , , , | 2 Comments

The Mysterious h Function

What is this mysterious h function? It encodes strings, so that special characters become HTML-compliant–it turns angle brackets, tabs, and other characters into HTML entities. You can use it partly for security, to avoid cross-site scripting and other security vulnerabilities! Continue reading

Posted in Development | Tagged , , | Comments Off

User IP

An IP is a valuable identifier. How can you find the user’s IP in Rails? It’s located in request.env['REMOTE_ADDR']. The best part is, for local testing, you can even set a value to the variable yourself, and spoof your IP! Continue reading

Posted in Development | Tagged , , | Comments Off