fbauth 0.9.9 → 0.9.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/facebook_auth_functions.rb +13 -2
- metadata +2 -1
@@ -67,8 +67,19 @@ private
|
|
67
67
|
elsif params[:signed_request].present?
|
68
68
|
sig, b64udata = params[:signed_request].split('.')
|
69
69
|
json = b64udata.tr('+/', '-_').unpack('m')[0]
|
70
|
-
|
71
|
-
|
70
|
+
begin
|
71
|
+
parms = JSON.parse(json)
|
72
|
+
rescue => e
|
73
|
+
begin
|
74
|
+
parms = JSON.parse(json + '"}')
|
75
|
+
rescue => e2
|
76
|
+
begin
|
77
|
+
parms = JSON.parse(json + '}')
|
78
|
+
rescue => e3
|
79
|
+
parms = {}
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
72
83
|
logger.warn("Parsed facebook params from signed_request parameter")
|
73
84
|
end
|
74
85
|
parms
|