coalescing_panda 4.6.0.rc3 → 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a04cb62b9c121ccb9ee348d441cb952eda9316a
4
- data.tar.gz: 7272d39eb8d3659bd0e8d4050dfabf0329e54ff1
3
+ metadata.gz: 61f78109d263c80140b9f4c04e0d4bb00f5b0c48
4
+ data.tar.gz: 3a27957a0bca404a35bc7247115de195389b0336
5
5
  SHA512:
6
- metadata.gz: f562379d4a6752b45b59a8d2733be2176782679aebea3d244f0311f2977f366e8277f0d3794dc1acc9275b2b0039c7a2a71ed1a864eda9a5a45e64ea901c4fb9
7
- data.tar.gz: 316930a437fe2eb25b2d39be63b0a592790559c158fcdc35e1382a0937cbdccb344af7634343385236f84f5dc8560f88c50bd9afb2547ae3ac201927ddaa0f65
6
+ metadata.gz: da367151b06b30cd990b882002d8cf3785fd2985c15fb053d58b86c74785e777193412e97818394ee2a870b7ebaeb98d4362de6401c4f54ea63e438ab502197f
7
+ data.tar.gz: a65b71236959d35a66eea943594dd12d0134ad6b0920acc0fde6307131161b25c9e6d6ab1dbb1e6e0ac9a26b00772f4ff24cde07cf67b70184103bd07b63fac1
@@ -1,6 +1,7 @@
1
+ require 'browser'
2
+
1
3
  module CoalescingPanda
2
4
  module ControllerHelpers
3
- require 'browser'
4
5
 
5
6
  def canvas_oauth2(*roles)
6
7
  return if have_session?
@@ -110,7 +111,7 @@ module CoalescingPanda
110
111
  authorized = authorized && @lti_account.validate_nonce(params['oauth_nonce'], DateTime.strptime(params['oauth_timestamp'], '%s'))
111
112
  logger.info 'not authorized on nonce' if !authorized
112
113
  render :text => 'Invalid Credentials, please contact your Administrator.', :status => :unauthorized unless authorized
113
- check_for_iframes_problem
114
+ check_for_iframes_problem if authorized
114
115
  authorized
115
116
  end
116
117
 
@@ -173,7 +174,7 @@ module CoalescingPanda
173
174
  def check_for_iframes_problem
174
175
  if cookies_need_iframe_fix?
175
176
  fix_iframe_cookies
176
- return
177
+ return false
177
178
  end
178
179
 
179
180
  # For safari we may have been launched temporarily full-screen by canvas. This allows us to set the session cookie.
@@ -181,12 +182,13 @@ module CoalescingPanda
181
182
  if params[:platform_redirect_url]
182
183
  session[:safari_cookie_fixed] = true
183
184
  redirect_to params[:platform_redirect_url]
184
- return
185
+ return false
185
186
  end
186
187
  end
187
188
 
188
189
  def cookies_need_iframe_fix?
189
- browser.safari? && !request.referrer&.include?('sessionless_launch') && !session[:safari_cookie_fixed] && !params[:platform_redirect_url]
190
+ @browser ||= Browser.new(request.user_agent)
191
+ @browser.safari? && !request.referrer&.include?('sessionless_launch') && !session[:safari_cookie_fixed] && !params[:platform_redirect_url]
190
192
  end
191
193
 
192
194
  def fix_iframe_cookies
@@ -1,3 +1,3 @@
1
1
  module CoalescingPanda
2
- VERSION = '4.6.0.rc3'
2
+ VERSION = '4.6.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coalescing_panda
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.0.rc3
4
+ version: 4.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Mills
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-02-05 00:00:00.000000000 Z
13
+ date: 2020-02-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -547,9 +547,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
547
547
  version: '0'
548
548
  required_rubygems_version: !ruby/object:Gem::Requirement
549
549
  requirements:
550
- - - '>'
550
+ - - '>='
551
551
  - !ruby/object:Gem::Version
552
- version: 1.3.1
552
+ version: '0'
553
553
  requirements: []
554
554
  rubyforge_project:
555
555
  rubygems_version: 2.0.14