forest_liana 3.0.0.pre.beta.15 → 3.0.0.pre.beta.16
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 771c7f710235e9a37b708b768fed552ebb1112e4
|
4
|
+
data.tar.gz: 305988ac4fac4b6b3a635d238c8d79be29f6cf9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 529274c1d3ed7c3e9f063eed6ded75055c027e5a6b0f7d6a97621b8186e32992defb61fc59869c5b29f25be57243dd844d15d17e89111ce6fc8a478a053f27b5
|
7
|
+
data.tar.gz: d76643b4229e0cbdbf3cfde7f80615dceb31830dc0a55caa00c572750cfa4793dd67fc74ed0df2a321fb2730b9cd94e1d9e4d07de454e5e549809bee83de5083
|
@@ -3,7 +3,7 @@ require 'csv'
|
|
3
3
|
|
4
4
|
module ForestLiana
|
5
5
|
class ApplicationController < ForestLiana::BaseController
|
6
|
-
REGEX_COOKIE_SESSION_TOKEN = /
|
6
|
+
REGEX_COOKIE_SESSION_TOKEN = /forest_session_token=([^;]*)/;
|
7
7
|
|
8
8
|
def self.papertrail?
|
9
9
|
Object.const_get('PaperTrail::Version').is_a?(Class) rescue false
|
@@ -82,6 +82,10 @@ module ForestLiana
|
|
82
82
|
|
83
83
|
render(serializer: nil, json: nil, status: :internal_server_error)
|
84
84
|
else
|
85
|
+
# NOTICE: Set a cookie to ensure secure authentication using export feature.
|
86
|
+
# NOTICE: The token is empty at first authentication step if the 2FA option is active.
|
87
|
+
response.set_cookie("forest_session_token", reponse_data[:token]) if reponse_data[:token]
|
88
|
+
|
85
89
|
render(json: reponse_data, serializer: nil)
|
86
90
|
end
|
87
91
|
end
|
data/lib/forest_liana/engine.rb
CHANGED
@@ -23,7 +23,7 @@ module ForestLiana
|
|
23
23
|
hostnames += ENV['CORS_ORIGINS'].split(',') if ENV['CORS_ORIGINS']
|
24
24
|
|
25
25
|
origins hostnames
|
26
|
-
resource '*', headers: :any, methods: :any, max_age: 86400 # NOTICE: 1 day
|
26
|
+
resource '*', headers: :any, methods: :any, credentials: true, max_age: 86400 # NOTICE: 1 day
|
27
27
|
end
|
28
28
|
end
|
29
29
|
nil
|
data/lib/forest_liana/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_liana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.pre.beta.
|
4
|
+
version: 3.0.0.pre.beta.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|