Created
May 12, 2013 19:59
-
-
Save dgutov/5564706 to your computer and use it in GitHub Desktop.
Rack::Protection::SessionHijacking video tag false positive
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
require "sinatra" | |
require "pry" | |
enable :sessions | |
set :session_secret, "cupcakes" | |
get "/" do | |
session[:sheep] ||= 0 | |
session[:sheep] += 1 | |
erb :index | |
end | |
get "/video" do | |
session[:sheep] ||= 0 | |
erb :video | |
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
require './app' | |
run Sinatra::Application |
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
<html> | |
<head> | |
<title>Test</title> | |
</head> | |
<body> | |
<p>Session: <%= session[:session_id] %></p> | |
<p>Sheep count: <%= session[:sheep] %></p> | |
<img src="/foo.png" /> | |
<a href="/video">video</a> | |
</body> | |
</html> |
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
<html> | |
<head> | |
<title>Test</title> | |
</head> | |
<body> | |
<p>Session: <%= session[:session_id] %></p> | |
<p>Sheep count: <%= session[:sheep] %></p> | |
<video src="/foo.mp4" /> | |
<a href="/">back</a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment