hubssolib 3.8.1 → 3.8.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: 5fea64186dc1f80987fb5b531c46ac8eb9fff78878520b38e392a91dad8de7a9
4
- data.tar.gz: 2ebe2f6599cbd9bf9dbfbaa6ebbbb81e99fe6f4922c5f8c19e250e380222c3c9
3
+ metadata.gz: 6b90f9617fc1a625f402510ee5497d4d357f914d7f35284e6c1e25b62ae07f4b
4
+ data.tar.gz: 450ead4d1423e6b42fd6a0aba65fdf043d6c5e3a6c3dc1b7b04412b2fcd4e65c
5
5
  SHA512:
6
- metadata.gz: 44b066f10c3615a752b258d85ccf5316358c33af6589c9702ab6b2ae8036f6e7eda9f99ab2a2707dc9acce9e9377ce5e73f28c3533eaec7c7312ac5e6e828fe3
7
- data.tar.gz: 1f7ae4d9e29916eb3d14e3c057b61f95192be76954270fd8570dd596a5552495561df2bddd1f16f887ac613bbcd3292fd75228f4bbddf87faeda698c2a866067
6
+ metadata.gz: 1a03c285659733df8dd98c93faaf458549229c8a096cba58c797c04139788bddf2592c2a12b99a5c87d02ffac4a936db703317d4957ec48d25790a21eb3ddadb
7
+ data.tar.gz: b392255f66a678625bab09ec613d69f77ab8cf60818764fcc4b2b55028e317854e24e8125a527ccac598b6845ba10f794524ffa82579a2f5ef30258fafbba887
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 3.8.2, 17-May-2025
2
+
3
+ * General maintenance update.
4
+
1
5
  ## 3.8.1, 09-Apr-2025
2
6
 
3
7
  * It's been too long since I worked with DRb! Important fix for "live" (undumpable) vs copied objects which could lead to session enumeration problems in clients. Now, sessions enumerated by user ID are copies as is user data returned by HubSsoLib::Core#hubssolib_enumerate_users.
data/Gemfile.lock CHANGED
@@ -1,36 +1,38 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hubssolib (3.8.1)
4
+ hubssolib (3.8.2)
5
5
  base64 (~> 0.2)
6
6
  drb (~> 2.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (8.0.2)
12
- actionpack (= 8.0.2)
13
- activesupport (= 8.0.2)
11
+ action_text-trix (2.1.19)
12
+ railties
13
+ actioncable (8.1.3)
14
+ actionpack (= 8.1.3)
15
+ activesupport (= 8.1.3)
14
16
  nio4r (~> 2.0)
15
17
  websocket-driver (>= 0.6.1)
16
18
  zeitwerk (~> 2.6)
17
- actionmailbox (8.0.2)
18
- actionpack (= 8.0.2)
19
- activejob (= 8.0.2)
20
- activerecord (= 8.0.2)
21
- activestorage (= 8.0.2)
22
- activesupport (= 8.0.2)
19
+ actionmailbox (8.1.3)
20
+ actionpack (= 8.1.3)
21
+ activejob (= 8.1.3)
22
+ activerecord (= 8.1.3)
23
+ activestorage (= 8.1.3)
24
+ activesupport (= 8.1.3)
23
25
  mail (>= 2.8.0)
24
- actionmailer (8.0.2)
25
- actionpack (= 8.0.2)
26
- actionview (= 8.0.2)
27
- activejob (= 8.0.2)
28
- activesupport (= 8.0.2)
26
+ actionmailer (8.1.3)
27
+ actionpack (= 8.1.3)
28
+ actionview (= 8.1.3)
29
+ activejob (= 8.1.3)
30
+ activesupport (= 8.1.3)
29
31
  mail (>= 2.8.0)
30
32
  rails-dom-testing (~> 2.2)
31
- actionpack (8.0.2)
32
- actionview (= 8.0.2)
33
- activesupport (= 8.0.2)
33
+ actionpack (8.1.3)
34
+ actionview (= 8.1.3)
35
+ activesupport (= 8.1.3)
34
36
  nokogiri (>= 1.8.5)
35
37
  rack (>= 2.2.4)
36
38
  rack-session (>= 1.0.1)
@@ -38,87 +40,93 @@ GEM
38
40
  rails-dom-testing (~> 2.2)
39
41
  rails-html-sanitizer (~> 1.6)
40
42
  useragent (~> 0.16)
41
- actiontext (8.0.2)
42
- actionpack (= 8.0.2)
43
- activerecord (= 8.0.2)
44
- activestorage (= 8.0.2)
45
- activesupport (= 8.0.2)
43
+ actiontext (8.1.3)
44
+ action_text-trix (~> 2.1.15)
45
+ actionpack (= 8.1.3)
46
+ activerecord (= 8.1.3)
47
+ activestorage (= 8.1.3)
48
+ activesupport (= 8.1.3)
46
49
  globalid (>= 0.6.0)
47
50
  nokogiri (>= 1.8.5)
48
- actionview (8.0.2)
49
- activesupport (= 8.0.2)
51
+ actionview (8.1.3)
52
+ activesupport (= 8.1.3)
50
53
  builder (~> 3.1)
51
54
  erubi (~> 1.11)
52
55
  rails-dom-testing (~> 2.2)
53
56
  rails-html-sanitizer (~> 1.6)
54
- activejob (8.0.2)
55
- activesupport (= 8.0.2)
57
+ activejob (8.1.3)
58
+ activesupport (= 8.1.3)
56
59
  globalid (>= 0.3.6)
57
- activemodel (8.0.2)
58
- activesupport (= 8.0.2)
59
- activerecord (8.0.2)
60
- activemodel (= 8.0.2)
61
- activesupport (= 8.0.2)
60
+ activemodel (8.1.3)
61
+ activesupport (= 8.1.3)
62
+ activerecord (8.1.3)
63
+ activemodel (= 8.1.3)
64
+ activesupport (= 8.1.3)
62
65
  timeout (>= 0.4.0)
63
- activestorage (8.0.2)
64
- actionpack (= 8.0.2)
65
- activejob (= 8.0.2)
66
- activerecord (= 8.0.2)
67
- activesupport (= 8.0.2)
66
+ activestorage (8.1.3)
67
+ actionpack (= 8.1.3)
68
+ activejob (= 8.1.3)
69
+ activerecord (= 8.1.3)
70
+ activesupport (= 8.1.3)
68
71
  marcel (~> 1.0)
69
- activesupport (8.0.2)
72
+ activesupport (8.1.3)
70
73
  base64
71
- benchmark (>= 0.3)
72
74
  bigdecimal
73
75
  concurrent-ruby (~> 1.0, >= 1.3.1)
74
76
  connection_pool (>= 2.2.5)
75
77
  drb
76
78
  i18n (>= 1.6, < 2)
79
+ json
77
80
  logger (>= 1.4.2)
78
81
  minitest (>= 5.1)
79
82
  securerandom (>= 0.3)
80
83
  tzinfo (~> 2.0, >= 2.0.5)
81
84
  uri (>= 0.13.1)
82
- base64 (0.2.0)
83
- benchmark (0.4.0)
84
- bigdecimal (3.1.9)
85
+ base64 (0.3.0)
86
+ bigdecimal (4.1.2)
85
87
  builder (3.3.0)
86
- concurrent-ruby (1.3.5)
87
- connection_pool (2.5.0)
88
+ concurrent-ruby (1.3.6)
89
+ connection_pool (3.0.2)
88
90
  crass (1.0.6)
89
- date (3.4.1)
90
- debug (1.10.0)
91
+ date (3.5.1)
92
+ debug (1.11.1)
91
93
  irb (~> 1.10)
92
94
  reline (>= 0.3.8)
93
- diff-lcs (1.6.1)
95
+ diff-lcs (1.6.2)
94
96
  docile (1.4.1)
95
97
  doggo (1.4.0)
96
98
  rspec-core (~> 3.13)
97
- drb (2.2.1)
99
+ drb (2.2.3)
100
+ erb (6.0.4)
98
101
  erubi (1.13.1)
99
- globalid (1.2.1)
102
+ globalid (1.3.0)
100
103
  activesupport (>= 6.1)
101
- i18n (1.14.7)
104
+ i18n (1.14.8)
102
105
  concurrent-ruby (~> 1.0)
103
- io-console (0.8.0)
104
- irb (1.15.2)
106
+ io-console (0.8.2)
107
+ irb (1.18.0)
105
108
  pp (>= 0.6.0)
109
+ prism (>= 1.3.0)
106
110
  rdoc (>= 4.0.0)
107
111
  reline (>= 0.4.2)
112
+ json (2.19.5)
108
113
  logger (1.7.0)
109
- loofah (2.24.0)
114
+ loofah (2.25.1)
110
115
  crass (~> 1.0.2)
111
116
  nokogiri (>= 1.12.0)
112
- mail (2.8.1)
117
+ mail (2.9.0)
118
+ logger
113
119
  mini_mime (>= 0.1.1)
114
120
  net-imap
115
121
  net-pop
116
122
  net-smtp
117
- marcel (1.0.4)
123
+ marcel (1.1.0)
118
124
  mini_mime (1.1.5)
119
- mini_portile2 (2.8.8)
120
- minitest (5.25.5)
121
- net-imap (0.5.6)
125
+ mini_portile2 (2.8.9)
126
+ minitest (6.0.6)
127
+ drb (~> 2.0)
128
+ prism (~> 1.5)
129
+ net-imap (0.6.4)
122
130
  date
123
131
  net-protocol
124
132
  net-pop (0.1.2)
@@ -127,91 +135,96 @@ GEM
127
135
  timeout
128
136
  net-smtp (0.5.1)
129
137
  net-protocol
130
- nio4r (2.7.4)
131
- nokogiri (1.18.7)
138
+ nio4r (2.7.5)
139
+ nokogiri (1.19.3)
132
140
  mini_portile2 (~> 2.8.2)
133
141
  racc (~> 1.4)
134
- pp (0.6.2)
142
+ pp (0.6.3)
135
143
  prettyprint
136
144
  prettyprint (0.2.0)
137
- psych (5.2.3)
145
+ prism (1.9.0)
146
+ psych (5.3.1)
138
147
  date
139
148
  stringio
140
149
  racc (1.8.1)
141
- rack (3.1.12)
142
- rack-session (2.1.0)
150
+ rack (3.2.6)
151
+ rack-session (2.1.2)
143
152
  base64 (>= 0.1.0)
144
153
  rack (>= 3.0.0)
145
154
  rack-test (2.2.0)
146
155
  rack (>= 1.3)
147
- rackup (2.2.1)
156
+ rackup (2.3.1)
148
157
  rack (>= 3)
149
- rails (8.0.2)
150
- actioncable (= 8.0.2)
151
- actionmailbox (= 8.0.2)
152
- actionmailer (= 8.0.2)
153
- actionpack (= 8.0.2)
154
- actiontext (= 8.0.2)
155
- actionview (= 8.0.2)
156
- activejob (= 8.0.2)
157
- activemodel (= 8.0.2)
158
- activerecord (= 8.0.2)
159
- activestorage (= 8.0.2)
160
- activesupport (= 8.0.2)
158
+ rails (8.1.3)
159
+ actioncable (= 8.1.3)
160
+ actionmailbox (= 8.1.3)
161
+ actionmailer (= 8.1.3)
162
+ actionpack (= 8.1.3)
163
+ actiontext (= 8.1.3)
164
+ actionview (= 8.1.3)
165
+ activejob (= 8.1.3)
166
+ activemodel (= 8.1.3)
167
+ activerecord (= 8.1.3)
168
+ activestorage (= 8.1.3)
169
+ activesupport (= 8.1.3)
161
170
  bundler (>= 1.15.0)
162
- railties (= 8.0.2)
163
- rails-dom-testing (2.2.0)
171
+ railties (= 8.1.3)
172
+ rails-dom-testing (2.3.0)
164
173
  activesupport (>= 5.0.0)
165
174
  minitest
166
175
  nokogiri (>= 1.6)
167
- rails-html-sanitizer (1.6.2)
168
- loofah (~> 2.21)
176
+ rails-html-sanitizer (1.7.0)
177
+ loofah (~> 2.25)
169
178
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
170
- railties (8.0.2)
171
- actionpack (= 8.0.2)
172
- activesupport (= 8.0.2)
179
+ railties (8.1.3)
180
+ actionpack (= 8.1.3)
181
+ activesupport (= 8.1.3)
173
182
  irb (~> 1.13)
174
183
  rackup (>= 1.0.0)
175
184
  rake (>= 12.2)
176
185
  thor (~> 1.0, >= 1.2.2)
186
+ tsort (>= 0.2)
177
187
  zeitwerk (~> 2.6)
178
- rake (13.2.1)
179
- rdoc (6.13.1)
188
+ rake (13.4.2)
189
+ rdoc (7.2.0)
190
+ erb
180
191
  psych (>= 4.0.0)
181
- reline (0.6.1)
192
+ tsort
193
+ reline (0.6.3)
182
194
  io-console (~> 0.5)
183
- rspec (3.13.0)
195
+ rspec (3.13.2)
184
196
  rspec-core (~> 3.13.0)
185
197
  rspec-expectations (~> 3.13.0)
186
198
  rspec-mocks (~> 3.13.0)
187
- rspec-core (3.13.3)
199
+ rspec-core (3.13.6)
188
200
  rspec-support (~> 3.13.0)
189
- rspec-expectations (3.13.3)
201
+ rspec-expectations (3.13.5)
190
202
  diff-lcs (>= 1.2.0, < 2.0)
191
203
  rspec-support (~> 3.13.0)
192
- rspec-mocks (3.13.2)
204
+ rspec-mocks (3.13.8)
193
205
  diff-lcs (>= 1.2.0, < 2.0)
194
206
  rspec-support (~> 3.13.0)
195
- rspec-support (3.13.2)
207
+ rspec-support (3.13.7)
196
208
  securerandom (0.4.1)
197
209
  simplecov (0.22.0)
198
210
  docile (~> 1.1)
199
211
  simplecov-html (~> 0.11)
200
212
  simplecov_json_formatter (~> 0.1)
201
- simplecov-html (0.13.1)
213
+ simplecov-html (0.13.2)
202
214
  simplecov_json_formatter (0.1.4)
203
- stringio (3.1.6)
204
- thor (1.3.2)
205
- timeout (0.4.3)
215
+ stringio (3.2.0)
216
+ thor (1.5.0)
217
+ timeout (0.6.1)
218
+ tsort (0.2.0)
206
219
  tzinfo (2.0.6)
207
220
  concurrent-ruby (~> 1.0)
208
- uri (1.0.3)
221
+ uri (1.1.1)
209
222
  useragent (0.16.11)
210
- websocket-driver (0.7.7)
223
+ websocket-driver (0.8.0)
211
224
  base64
212
225
  websocket-extensions (>= 0.1.0)
213
226
  websocket-extensions (0.1.5)
214
- zeitwerk (2.7.2)
227
+ zeitwerk (2.7.5)
215
228
 
216
229
  PLATFORMS
217
230
  ruby
@@ -226,4 +239,4 @@ DEPENDENCIES
226
239
  simplecov (~> 0.22)
227
240
 
228
241
  BUNDLED WITH
229
- 2.6.2
242
+ 4.0.10
data/README.md CHANGED
@@ -462,7 +462,7 @@ The payload items shown above are both mandatory:
462
462
 
463
463
  If either item is missing or blank, or if for any reason Hub finds itself unable to associated the action with a user record on Hub's side, then no e-mail message will be sent.
464
464
 
465
- **IMPORTANT:** The Hub application's database migration at the time you updated to 3.7.0 will have set existing users to trusted for historic data, but new users are untrusted. If you introduce trust integration to your site's other apps after this, you might want to enter the console to update any new users added since likewise; inside `app/hub`, issue:
465
+ **OPTIONAL DATA MIGRATION:** The Hub application's database migration at the time you updated to 3.7.0 will have set existing users to trusted for historic data, but new users are untrusted. If you introduce trust integration to your site's other apps after this, you might want to enter the console to update any new users added since likewise; inside `app/hub`, issue:
466
466
 
467
467
  ```
468
468
  $ bundle exec rails c
@@ -471,3 +471,17 @@ $ bundle exec rails c
471
471
  ```
472
472
 
473
473
  The trust mechanism involves a fair amount of effort on the integrating app's side but it can be very useful if you have a site where, despite your best efforts, sometimes spam/bot accounts manage to get inside and try to flood the system with spam. It's just one of many different potential protection and mitigation mechanisms that your site might choose to employ.
474
+
475
+ **SERVER NOTE:** The Trust DRb server runs inside the Hub application, which runs using Puma as a server by default. The Trust server is started within the Hub application's `puma.rb` configuration file, because it needs to make sure it runs once, after booting, and is not destroyed by worker fork teardown/standup. If you aren't going to use Puma, you'll need to find a way to set this up; you'll want code akin to this in `app/hub/config/application.rb`:
476
+
477
+ ```ruby
478
+ if defined? Rails::Server
479
+ Rails::Application::Finisher.initializer 'uk.org.pond.hubssolib.trustserver' do
480
+ Thread.new do
481
+ HubSsoLib::Trust.launch_server()
482
+ end
483
+ end
484
+ end
485
+ ```
486
+
487
+ ...but that only works if the code would be run once and never torn down (a one-process server setup). There are many different Ruby web server approaches and it's not possible to be more specific; you just need to read the documentation about lifecycles and callbacks for the server you choose.
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.8.1'
7
+ s.version = '3.8.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
@@ -918,13 +918,21 @@ module HubSsoLib
918
918
  HUB_TRUST_CONNECTION_URI
919
919
  end
920
920
 
921
+ # Is the server already running?
922
+ #
923
+ def self.already_running?
924
+ uri = self.get_trust_server_connection_uri()
925
+ path = URI.parse(uri).path
926
+
927
+ return File.exist?(path)
928
+ end
929
+
921
930
  # Start the trust server. This should only ever be called by the Hub Rails
922
931
  # application, which implements HubSsoLib::Trust::Server.
923
932
  #
924
933
  def self.launch_server
925
934
  uri = self.get_trust_server_connection_uri()
926
- path = URI.parse(uri).path
927
- already_running = File.exist?(path)
935
+ already_running = self.already_running?
928
936
 
929
937
  unless ENV['HUB_QUIET_SERVER'] == 'yes'
930
938
  message = unless already_running
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.8.1
4
+ version: 3.8.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-04-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: drb
@@ -138,7 +138,6 @@ files:
138
138
  - Gemfile
139
139
  - Gemfile.lock
140
140
  - README.md
141
- - hubssolib-3.7.0.gem
142
141
  - hubssolib.gemspec
143
142
  - lib/hub_sso_lib.rb
144
143
  homepage: http://pond.org.uk/
@@ -159,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
158
  - !ruby/object:Gem::Version
160
159
  version: '0'
161
160
  requirements: []
162
- rubygems_version: 3.6.2
161
+ rubygems_version: 4.0.10
163
162
  specification_version: 4
164
163
  summary: Cross-application single sign-on support library.
165
164
  test_files: []
data/hubssolib-3.7.0.gem DELETED
Binary file