Eficode/rails-int-hh — pull request #37 by vvainio (2012-05-15 21:29:13+00:00)
Title: Session 6 - Homework

Yikes, I totally forgot the deadline, sorry about that!

Note: the commit was erroneously pushed as "Session 5 - Homework". However, the edited files are: gemfile, config/environment.rb.

----
Task 1:

Ruby On Rails 3.1.1 security vulnerabilities listed [here](http://www.cvedetails.com/vulnerability-list/vendor_id-4954/product_id-8446/version_id-116918/Ruby-On-Rails-Ruby-On-Rails-3.1.1.html). (3 XSS vulnerabilities)

Latest version 3.2.3 is not listed. However, this release includes important updates to the mass assignment vulnerability.

----
Task 2:

Version 1.9.2 security vulnerabilities listed [here](http://www.cvedetails.com/vulnerability-list/vendor_id-7252/product_id-12215/version_id-105451/Ruby-lang-Ruby-1.9.2.html). (3)

Version 1.9.3 security vulnerabilities listed [here](http://www.cvedetails.com/vulnerability-list/vendor_id-7252/product_id-12215/version_id-105452/Ruby-lang-Ruby-1.9.3.html). (2)

---
Workflow:
1. Modified environment.rb
2. Modified gemfile
3. Ran ```bundle update```
4. Ran ```rake db:migrate``` which resulted in an expected error: ```This application requires Ruby version 1.9.3 or newer to run. Your current version is 1.9.2.```
5. Ran ```rvm list known``` to get an up-to-date list of current Ruby versions
6. Ran ```rvm install 1.9.3``` to upgrade Ruby to the newest stable version.
7. Ran ```ruby -v``` to check the version: ```ruby 1.9.2p318 (2012-02-14 revision 34678) [x86_64-linux]```. As you can see, the version here is not correct.
8. Ran ```rvm ruby-1.9.3```
9. Ran ```ruby -v``` again which resulted in ```ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]```.
10. Ran ```bundle install```
11. Ran ```rake db:migrate``` which resulted in an error: ```undefined method `render_to_body' for module `AbstractController::Rendering```. The error was related to the haml-gem (incompatible version being 3.1.5, updated it to 3.2.0.alpha.10).
11. Edited gemfile and ran ```bundle update haml```
12. Ran ```rake db:migrate``` again
12. Success!