buddy 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/buddy/middleware.rb +4 -4
- data/lib/buddy/version.rb +1 -1
- metadata +2 -2
data/lib/buddy/middleware.rb
CHANGED
@@ -57,7 +57,7 @@ module Buddy
|
|
57
57
|
if signed_request
|
58
58
|
signature, signed_params = signed_request.split('.')
|
59
59
|
|
60
|
-
unless signed_request_is_valid?(Buddy.
|
60
|
+
unless signed_request_is_valid?(Buddy.config['secret'], signature, signed_params)
|
61
61
|
return Rack::Response.new(["Invalid Facebook signature"], 400).finish
|
62
62
|
end
|
63
63
|
|
@@ -66,8 +66,8 @@ module Buddy
|
|
66
66
|
env['rack.request.form_hash'] ? env['rack.request.form_hash'].merge!({'fb' => signed_params}) : env['rack.request.form_hash'] = {'fb' => signed_params}
|
67
67
|
|
68
68
|
set_session(signed_params)
|
69
|
-
elsif @request.cookies["fbs_#{Buddy.
|
70
|
-
payload = @request.cookies["fbs_#{Buddy.
|
69
|
+
elsif @request.cookies["fbs_#{Buddy.config['app_id']}"]
|
70
|
+
payload = @request.cookies["fbs_#{Buddy.config['app_id']}"].chomp('"')
|
71
71
|
payload.sub!('"', '') if payload.start_with?('"')
|
72
72
|
set_session(Rack::Utils.parse_query(payload))
|
73
73
|
end
|
@@ -98,7 +98,7 @@ module Buddy
|
|
98
98
|
access_token = payload['oauth_token'] || payload['access_token']
|
99
99
|
expires = payload['expires']
|
100
100
|
|
101
|
-
@request.session['facebook_session'] = Buddy::Session.create(Buddy.
|
101
|
+
@request.session['facebook_session'] = Buddy::Session::User.create(Buddy.config['app_id'], Buddy.config['secret'])
|
102
102
|
@request.session['facebook_session'].secure!(uid.to_i, access_token, expires.to_i) unless uid.blank? or access_token.blank?
|
103
103
|
end
|
104
104
|
end
|
data/lib/buddy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-11-
|
12
|
+
date: 2011-11-02 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: Facebook library focusing on getting the work done.
|
15
15
|
email:
|