From 907045488d404bb6f608b1757279fef31e9485c6 Mon Sep 17 00:00:00 2001 From: cktricky Date: Fri, 9 Jan 2015 11:40:37 -0500 Subject: [PATCH 1/5] this change allows the app to get the csrf fixes working when running rake training --- config/environments/test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/test.rb b/config/environments/test.rb index 71d265d..d842cdd 100755 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -22,7 +22,7 @@ Railsgoat::Application.configure do config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false + config.action_controller.allow_forgery_protection = true # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the From 3d29293bd46b0c3a27b98df0f034f925c3ff8c5f Mon Sep 17 00:00:00 2001 From: cktricky Date: Sun, 8 Feb 2015 18:10:27 -0500 Subject: [PATCH 2/5] pry instead of rails c --- Gemfile | 3 +++ Gemfile.lock | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Gemfile b/Gemfile index 3539b41..f00a614 100755 --- a/Gemfile +++ b/Gemfile @@ -11,6 +11,9 @@ ruby '2.1.5' gem 'sqlite3' gem 'foreman' +# Pry for Rails, not in dev group in case running via prod/staging @ a training +gem 'pry-rails' + group :development, :mysql do gem 'brakeman' gem 'bundler-audit' diff --git a/Gemfile.lock b/Gemfile.lock index 5516b7c..4034036 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -184,6 +184,8 @@ GEM coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) + pry-rails (0.3.3) + pry (>= 0.9.10) rack (1.4.5) rack-cache (1.2) rack (>= 0.4) @@ -328,6 +330,7 @@ DEPENDENCIES poltergeist powder pry + pry-rails rack-livereload rails (= 3.2.21) rb-fsevent From 1eee953f62653b30f6c46ec0b8c3b9b4e1a7997e Mon Sep 17 00:00:00 2001 From: Mike McCabe Date: Mon, 23 Feb 2015 20:36:53 -0500 Subject: [PATCH 3/5] adding render vuln --- app/controllers/dashboard_controller.rb | 5 ++++- app/views/dashboard/home.html.erb | 4 +++- config/routes.rb | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) mode change 100755 => 100644 app/controllers/dashboard_controller.rb mode change 100755 => 100644 app/views/dashboard/home.html.erb mode change 100755 => 100644 config/routes.rb diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb old mode 100755 new mode 100644 index 8b351bf..cfa0921 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -22,5 +22,8 @@ class DashboardController < ApplicationController @user = current_user render :partial => "layouts/dashboard/dashboard_stats" end - + + def doc + render "../../doc/" + params[:doc] + end end diff --git a/app/views/dashboard/home.html.erb b/app/views/dashboard/home.html.erb old mode 100755 new mode 100644 index 5b0811a..cee5c39 --- a/app/views/dashboard/home.html.erb +++ b/app/views/dashboard/home.html.erb @@ -27,13 +27,15 @@ - +
Need help using this portal? Check out the Readme
+ +