The talk covered some best practices and pitfalls when writing a secure web application in ruby on rails. With examples on how to deal with the OWASP top 10, as well as some ruby specific vulnerabilities.
Click here to access the Git Repository with the working code.
Please follow these steps in orther to get the app to work:
To install, you must have ruby, gem, and bundler installed. Run the following command to install dependencies:
To get the SQL injection stuff working, you will have to perform a few additional steps.
If you want to use MySQL, then you will have to edit the
Specify the adapter as
mysql2 and then set the username, password, database, and host properties as appropriate.
In any case, you must run the following tasks to create/migrate the database:
bundle exec rake db:create bundle exec rake db:schema:load
To create some data to populate the database, run rails console, and use the following command
User.create(:name => 'Name', :email => 'email@example.com', :points => 1000, :password_hash => 'fff')
You can change the attributes appropriately and run the command multiple times.
To run the application, simply run
bundle exec rails server
The bundle exec can be omitted if you are using some sort of ruby environment manager like RVM.