From 4b0560a25003c6cd32b76c5981f92218f2f30e1f Mon Sep 17 00:00:00 2001 From: cktricky Date: Wed, 12 Mar 2014 18:59:38 -0400 Subject: [PATCH] whew, now THAT is a huge tutorial explanation for a relatively simple issue! --- app/controllers/api/v1/users_controller.rb | 2 + app/controllers/tutorials_controller.rb | 3 +- app/views/layouts/tutorial/_sidebar.html.erb | 3 + .../logic_flaws/_broken_regexp.html.erb | 219 ++++++++++++++++++ app/views/tutorials/logic_flaws.html.erb | 19 ++ config/routes.rb | 1 + 6 files changed, 246 insertions(+), 1 deletion(-) create mode 100644 app/views/layouts/tutorial/logic_flaws/_broken_regexp.html.erb create mode 100644 app/views/tutorials/logic_flaws.html.erb diff --git a/app/controllers/api/v1/users_controller.rb b/app/controllers/api/v1/users_controller.rb index d995abb..6866774 100644 --- a/app/controllers/api/v1/users_controller.rb +++ b/app/controllers/api/v1/users_controller.rb @@ -43,6 +43,8 @@ private hash == digest end + # We had some issues with the token and url encoding... + # this is an attempt to normalize the data. def unescape_token(token="") @clean_token = CGI::unescape(token) end diff --git a/app/controllers/tutorials_controller.rb b/app/controllers/tutorials_controller.rb index a8d151c..69df74f 100755 --- a/app/controllers/tutorials_controller.rb +++ b/app/controllers/tutorials_controller.rb @@ -83,7 +83,8 @@ class TutorialsController < ApplicationController def guard end - + def logic_flaws + end def mass_assignment end diff --git a/app/views/layouts/tutorial/_sidebar.html.erb b/app/views/layouts/tutorial/_sidebar.html.erb index b46902b..644b772 100755 --- a/app/views/layouts/tutorial/_sidebar.html.erb +++ b/app/views/layouts/tutorial/_sidebar.html.erb @@ -112,6 +112,9 @@
  • <%= link_to "Constantize", constantize_tutorials_path %>
  • +
  • + <%= link_to "Logic Flaws", logic_flaws_tutorials_path %> +
  • + + + + + + \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 2383276..6dfde00 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -58,6 +58,7 @@ Railsgoat::Application.routes.draw do get "mass_assignment" get "constantize" get "gauntlt" + get "logic_flaws" end end