panda_pal 5.9.0 → 5.9.1

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
  SHA256:
3
- metadata.gz: a3cef6069ef4d4c36af2ff4d665e9ae08d712198ea8422b1f60353e117753aec
4
- data.tar.gz: 4cce12d864ebbab515d5f496dc2371550dd986b920f9fbb6763b9c77db527e95
3
+ metadata.gz: fb8c3c39f3e1f5d4b3d2319fdcb3368157e0cfdc5c22562cbcc8969a059f12be
4
+ data.tar.gz: fcb174edfc70f4f72caf44dfc0d3e5d86d6bdb5c06ffbfd36747322236c264ee
5
5
  SHA512:
6
- metadata.gz: 0102ced164298cd5c56d9bd62bfbad019301fbc78d150eca69c0b90c142c038febe13a04c7d801a3d357a91cef3533110af26f537fba61725a0033bf5a42b9bd
7
- data.tar.gz: d188c8bfcbe5cfc73b3d5570c8a5252c0589f4443e3dd364e182f7252a09495c5888d87b515e00e5cd6907f392dda15e10ef14e346c5f7507cefedeff1812bfc
6
+ metadata.gz: a3a2614cebb9f890c8965a7fbcdf0b1a4dd89189257b3980c276c9da0a38c747276a08f819de0dc6ebaee9df6c6a4066f5356529fedf1722ac51020b2fe863d3
7
+ data.tar.gz: b0f2d3893f44b40592b3b7817fb763c6f230b63558d5230721beb1859a50efa122b673f206cf1775c42fb1edf3bd809a382044ccffafc2897e7e6d45e6f40af2
@@ -59,13 +59,13 @@ module PandaPal
59
59
  return
60
60
  end
61
61
 
62
- return unless defined?(Redis) && Redis.current
62
+ now = Time.zone.now.to_i
63
+ nonce_used = Rails.cache.fetch("panda_pal/launch_nonces/#{jwt[:nonce]}", expires_in: jwt[:exp] - now) do
64
+ now
65
+ end
63
66
 
64
- cache_key = "nonces/#{jwt[:nonce]}"
65
- if Redis.current.get(cache_key)
67
+ if nonce_used != now
66
68
  errors << 'Nonce has been used already'
67
- else
68
- Redis.current.set(cache_key, Time.zone.now.to_i, ex: 5.minutes)
69
69
  end
70
70
  end
71
71
 
@@ -1,3 +1,3 @@
1
1
  module PandaPal
2
- VERSION = "5.9.0"
2
+ VERSION = "5.9.1"
3
3
  end
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.9.0
4
+ version: 5.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure CustomDev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-14 00:00:00.000000000 Z
11
+ date: 2023-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails