fbauth 0.9.9 → 0.9.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
- json += "}" unless json =~ /\}$/ # Hack to fix missing } bug
71
- parms = JSON.parse(json)
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
metadata CHANGED
@@ -6,7 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 9
8
8
  - 9
9
- version: 0.9.9
9
+ - 1
10
+ version: 0.9.9.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Three Wise Men Inc.