Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixed a security problem that would allow a user to navigate past aut…
…hentication process.
- Loading branch information
lykaios
committed
May 2, 2012
1 parent
d79045e
commit b354109
Showing
6 changed files
with
19 additions
and
32 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
class ApplicationController < ActionController::Base | ||
protect_from_forgery | ||
|
||
private | ||
#Check if user isn't signed in. | ||
def validate_user | ||
if user_signed_in? | ||
else | ||
redirect_to root_path | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,11 @@ | ||
module SqlconsHelper | ||
|
||
def incsection | ||
if session[:tutsec] < session[:maxsec] | ||
session[:tutsec] += 1 | ||
end | ||
@qstring = "empty" | ||
@qresults = nil | ||
|
||
end | ||
|
||
def incch | ||
session[:tutch] += 1 if session[:tutch] < 2 | ||
session[:tutsec] = 1 | ||
end | ||
|
||
def resetlesson | ||
session[:tutsec] = 1 | ||
end | ||
|
||
|
||
# def incsection | ||
# if session[:tutsec] < session[:maxsec] | ||
# session[:tutsec] += 1 | ||
# end | ||
# @qstring = "empty" | ||
# @qresults = nil | ||
# | ||
# end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
class Userlesson < ActiveRecord::Base | ||
|
||
def self.update_lesson(user_id, chapter_completed) | ||
#put update stmt here. | ||
|
||
end | ||
end |