saml_camel 1.0.9 → 1.0.10

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6497f21e0312efd774c4be72fd3f24e7b1d420f037300f0c27fcdbdecac9087b
4
- data.tar.gz: 88c8c4631293e446f162dad8580f57075367159a945d2134e885568550cf8b6f
3
+ metadata.gz: 8883a80247875fe73ecb79704abaf9b0a249924b2b8df5582e6767ee49a3428b
4
+ data.tar.gz: 411a4be30453d4bb258065096062a6c6ce0cb89eca2ad852d9582eac8f978c1e
5
5
  SHA512:
6
- metadata.gz: c8d7d660fb5bfd955806264864fd7606a64c87b8065fc0df117fcf1952e9e8fc53f544a86953db3480d1452ae7e9cda2a5f5ab0044063314f2749313093061fa
7
- data.tar.gz: f36b845295a6cd8edd4b69c54bd10e675fd0075ff59ac1f165b354a5245c834371f538e6b8f53a04799e032952af957e91b2754991e485552e5a43b83d20931a
6
+ metadata.gz: c2f154ff374ab4aa74deaf11623b693b2373a872b1a6a5dcea008fee4914b32202e8f0cfbd1978934af6355787d5fc7cbdf89d7372d3e01c7eb7761ef7fcc007
7
+ data.tar.gz: 59eb90047c7ef00faf38ca5bef9a7b371ae9de4f677c2f12d94cf8305ed1ebb0b835c2f99c7bd93c3a438d6bce0d02ef1c242c0f2a98a7e338fa5c205145031e
@@ -28,7 +28,7 @@ module SamlCamel
28
28
  clock_drift = set_clock_drift
29
29
  settings = SamlCamel::Transaction.saml_settings(raw_response: raw_response)
30
30
  if clock_drift
31
- response = OneLogin::RubySaml::Response.new(idp_response, settings: settings, allowed_clock_drift: clock_drift.second)
31
+ response = OneLogin::RubySaml::Response.new(idp_response, settings: settings, allowed_clock_drift: 2.second)
32
32
  else
33
33
  response = OneLogin::RubySaml::Response.new(idp_response, settings: settings)
34
34
  end
@@ -41,14 +41,16 @@ module SamlCamel
41
41
  # however when I pulled the ruby-saml gem and searched the repo it looks like there is no clock drift by default
42
42
  def self.set_clock_drift
43
43
  clock_drift = SP_SETTINGS.dig('settings','clock_drift')
44
+ return false if !clock_drift
45
+
44
46
  # clock drift must either be an integer of falsey, classes have come through
45
47
  # differently (fixnum, bignum, integer), using a regex instead to see if that
46
48
  # addresses some issues https://stackoverflow.com/questions/16774064/regular-expression-for-whole-numbers-and-integers
47
- unless !clock_drift || clock_drift.match(/(?<![-.])\b[0-9]+\b(?!\.[0-9])/)
49
+ if !clock_drift.to_s.match(/(?<![-.])\b[0-9]+\b(?!\.[0-9])/)
48
50
  SamlCamel::Logging.clock_drift(clock_drift)
49
51
  raise "Clock Drift Incorrectly Configured."
50
52
  end
51
- clock_drift.to_i
53
+ clock_drift.to_i
52
54
  end
53
55
 
54
56
 
@@ -147,6 +149,7 @@ module SamlCamel
147
149
  sp_lifetime = SP_SETTINGS['settings']['sp_session_lifetime']
148
150
 
149
151
  SamlCamel::Logging.debug("Setting lifetime of session. Lifetime of #{sp_lifetime} hours") if SP_DEBUG
152
+ Rails.cache.delete(@cache_permit_key)
150
153
  Rails.cache.fetch(@cache_permit_key, expires_in: sp_lifetime.hours) do
151
154
  user_saml_cache
152
155
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SamlCamel
4
- VERSION = '1.0.9'
4
+ VERSION = '1.0.10'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saml_camel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - 'Danai Adkisson '
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-06 00:00:00.000000000 Z
11
+ date: 2020-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  requirements: []
142
- rubygems_version: 3.0.3
142
+ rubygems_version: 3.1.2
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: SAML tool wrapping onelogin/rubysaml