panda_pal 5.2.3 → 5.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/panda_pal/helpers/controller_helper.rb +5 -4
- data/lib/panda_pal/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1172960b6e10f42eb328a83126a990d94d897e5b53587ad2a9fbcf2ddbcef46e
|
4
|
+
data.tar.gz: 3ca6cc0d6f3e621741bf3891d858b6f8917618d31270f83aca8b0dcdd6c0ffa8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 746e87df1af33d9391a8b7ea2d90e244c720d86100dd033a68e2b5e21a6a3d0ac057d58c44acd178e5585751d1f6e11ff006df5da10ebb910eec7712e57e1cdb
|
7
|
+
data.tar.gz: b20a4ac6fc5b389c8dfd6df682d7c3c67c8fec4551bfc0fb2ada48dd2f2ac8a0806673a5a9e926bf9af961291a476978fb7bee4da32cc0f8915313c033ebd73f
|
@@ -3,7 +3,7 @@ require 'browser'
|
|
3
3
|
module PandaPal::Helpers::ControllerHelper
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
|
-
class
|
6
|
+
class SessionNonceMismatch < StandardError; end
|
7
7
|
|
8
8
|
included do
|
9
9
|
helper_method :link_nonce, :current_session
|
@@ -26,13 +26,12 @@ module PandaPal::Helpers::ControllerHelper
|
|
26
26
|
@current_session = matched_session
|
27
27
|
@current_session.data[:link_nonce] = nil
|
28
28
|
end
|
29
|
+
raise SessionNonceMismatch, "Session Not Found" unless @current_session.present?
|
29
30
|
elsif (session_key = params[:session_key] || session_key_header || flash[:session_key] || session[:session_key]).present?
|
30
31
|
@current_session = PandaPal::Session.find_by(session_key: session_key) if session_key.present?
|
31
|
-
else
|
32
|
-
@current_session = PandaPal::Session.new(panda_pal_organization_id: current_organization.id)
|
33
32
|
end
|
34
33
|
|
35
|
-
|
34
|
+
@current_session ||= PandaPal::Session.new(panda_pal_organization_id: current_organization.id)
|
36
35
|
|
37
36
|
@current_session
|
38
37
|
end
|
@@ -154,6 +153,8 @@ module PandaPal::Helpers::ControllerHelper
|
|
154
153
|
current_session.panda_pal_organization_id == current_organization.id,
|
155
154
|
Apartment::Tenant.current == current_organization.name
|
156
155
|
].all?
|
156
|
+
rescue SessionNonceMismatch
|
157
|
+
false
|
157
158
|
end
|
158
159
|
|
159
160
|
def safari_override
|
data/lib/panda_pal/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panda_pal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.
|
4
|
+
version: 5.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure ProServe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|