hubssolib 3.0.1 → 3.0.2

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: 36b026e98baa7f70c200a5abe0ff7e5e3a874e9aaf5a1f88c33114e45cb1ab14
4
- data.tar.gz: d19ff3d675d0b63286e06c03b6c3bce05be434a16f554533efde1152bb9c2641
3
+ metadata.gz: 856e89d2f8189bee83fdc33ec1cfea64c19a14e79d16703c434fd88f8502e933
4
+ data.tar.gz: 13d52a8023ec552a6756f4dd9f1e89533cd7d5c30b8898028c15b827d4bb5826
5
5
  SHA512:
6
- metadata.gz: a8d0724e454ffab27e616a91b1aa9837d4aefa5dff6d871bb92671ddefda789626e7cf3ed2dc523b48d4a09bcb3210c81ff279c7e553d2d579c8b00d6af693dd
7
- data.tar.gz: 36f17712168ba66f8de41193c41959dfa3ddb81e1ae5c683f4f747d177a6e4f5643aee2a8b387eaa244f0945608ee88f70552143f58f344e2a4078dabbf65ea4
6
+ metadata.gz: a1c68c61d8a3522cf78299a2163d17fbd1627d19bdcc687de54f764bea4ae5b9e295ffeb6d1bceb3a0605d53234121dfa89bf62216710f47aa89bc30b66fb2e8
7
+ data.tar.gz: 6bc61f08b7b633d8ba4c11e794a46f69475fad73fa5e94f9ae2a25c7169fb8c778540b717da807c22c1f2063a3f059573e280874f98ca43968945f8c1a9be71d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 3.0.2, 04-Feb 2025
2
+
3
+ Fixes a bug that could cause cookie deletions for login state indication to sometimes fail to work as expected.
4
+
1
5
  ## 3.0.0, 28-Jan-2025 and 3.0.1, 03-Feb-2025
2
6
 
3
7
  * The Hub "login indication" URL approach is now dropped, so layout templates **should be updated.**
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hubssolib (3.0.1)
4
+ hubssolib (3.0.2)
5
5
  base64 (~> 0.2)
6
6
  drb (~> 2.2)
7
7
 
data/hubssolib.gemspec CHANGED
@@ -4,7 +4,7 @@ spec = Gem::Specification.new do |s|
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.name = 'hubssolib'
6
6
 
7
- s.version = '3.0.1'
7
+ s.version = '3.0.2'
8
8
  s.author = 'Andrew Hodgkinson and others'
9
9
  s.email = 'ahodgkin@rowing.org.uk'
10
10
  s.homepage = 'http://pond.org.uk/'
data/lib/hub_sso_lib.rb CHANGED
@@ -42,10 +42,10 @@ module HubSsoLib
42
42
  HUB_IDLE_TIME_LIMIT = 4 * 60 * 60
43
43
 
44
44
  # Shared cookie name.
45
- HUB_COOKIE_NAME = 'hubapp_shared_id'
45
+ HUB_COOKIE_NAME = :hubapp_shared_id
46
46
 
47
47
  # Principally for #hubssolib_account_link.
48
- HUB_LOGIN_INDICATOR_COOKIE = 'hubapp_shared_id_alive'
48
+ HUB_LOGIN_INDICATOR_COOKIE = :hubapp_shared_id_alive
49
49
  HUB_LOGIN_INDICATOR_COOKIE_VALUE = 'Y'
50
50
 
51
51
  # Bypass SSL, for testing purposes? Rails 'production' mode will
@@ -722,7 +722,7 @@ module HubSsoLib
722
722
  logged_in = hubssolib_logged_in?
723
723
 
724
724
  if logged_in == false
725
- cookies.delete(HUB_LOGIN_INDICATOR_COOKIE)
725
+ cookies.delete(HUB_LOGIN_INDICATOR_COOKIE, domain: :all, path: '/')
726
726
 
727
727
  if login_is_required
728
728
  hubssolib_store_location
@@ -736,8 +736,9 @@ module HubSsoLib
736
736
  #
737
737
  cookies[HUB_LOGIN_INDICATOR_COOKIE] = {
738
738
  value: HUB_LOGIN_INDICATOR_COOKIE_VALUE,
739
- domain: :all,
740
739
  path: '/',
740
+ domain: :all,
741
+ expires: 1.year, # I.e. *not* session-scope
741
742
  secure: ! hub_bypass_ssl?,
742
743
  httponly: false
743
744
  }
@@ -1039,8 +1040,8 @@ module HubSsoLib
1039
1040
 
1040
1041
  cookies[HUB_COOKIE_NAME] = {
1041
1042
  value: key,
1042
- domain: :all,
1043
1043
  path: '/',
1044
+ domain: :all,
1044
1045
  secure: ! hub_bypass_ssl?,
1045
1046
  httponly: true
1046
1047
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubssolib
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Hodgkinson and others
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-03 00:00:00.000000000 Z
10
+ date: 2025-02-04 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: drb