carpool 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/carpool.gemspec +2 -2
- data/lib/carpool/passenger.rb +6 -2
- data/lib/carpool/seatbelt.rb +1 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/carpool.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{carpool}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Brent Kirby"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-09-12}
|
13
13
|
s.description = %q{Carpool is a single sign on solution for Rack-based applications allowing you to persist sessions across domains.}
|
14
14
|
s.email = %q{dev@kurbmedia.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/carpool/passenger.rb
CHANGED
@@ -48,9 +48,13 @@ module Carpool
|
|
48
48
|
|
49
49
|
referring_uri = @params['driver'].to_s
|
50
50
|
secret_match = Digest::SHA256.new
|
51
|
-
secret_match = secret_match.update(Carpool::Passenger.secret).
|
51
|
+
secret_match = secret_match.update(Carpool::Passenger.secret).to_s
|
52
|
+
referring_uri = referring_uri.to_s.gsub(/(\[|\]|\")/,'') # TODO: Figure out why ruby 1.9.2 has extra chars.
|
53
|
+
secret_match = secret_match.to_s
|
54
|
+
puts "Referring URI: #{referring_uri.class}"
|
55
|
+
puts "Secret: #{secret_match.class}"
|
52
56
|
puts "Trying to match #{referring_uri} to #{secret_match} : #{referring_uri == secret_match}"
|
53
|
-
referring_uri
|
57
|
+
referring_uri == secret_match
|
54
58
|
end
|
55
59
|
|
56
60
|
end
|
data/lib/carpool/seatbelt.rb
CHANGED
@@ -52,7 +52,7 @@ module Carpool
|
|
52
52
|
seatbelt = self.to_s
|
53
53
|
referrer = cookies[:redirect_to]
|
54
54
|
driver = Digest::SHA256.new
|
55
|
-
driver = driver.update(cookies[:current_passenger][:secret]).
|
55
|
+
driver = driver.update(cookies[:current_passenger][:secret]).to_s
|
56
56
|
new_uri = "#{referrer.scheme}://"
|
57
57
|
new_uri << referrer.host
|
58
58
|
new_uri << ((referrer.port != 80 && referrer.port != 443) ? ":#{referrer.port}" : "")
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carpool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brent Kirby
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-09-12 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|