startback 2.1.2 → 2.1.4

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: 8d29c7de7c7ebfb8c5cc68d73da62108b88cee7e24f0e59712601ed8ca8d776f
4
- data.tar.gz: 4b3e850a0465313739cb45662983e6af17edeb3dce768f2dcb4a9227085a8362
3
+ metadata.gz: 16aaf55cd5b96370f06ddb5d991ab102dcca2ca11af53f1eb6f1696fe9a32c43
4
+ data.tar.gz: 692b9c768939c22c1e7abe9d677cd10ea7bed01d57517e0a8c55cd43884de1d2
5
5
  SHA512:
6
- metadata.gz: 2f6b32627f15af41212ec13844db638f0d78bb5786d5151e6b0fab86b522ae294ede73bffb6cf2aff839f805eac9c85a9a6dde70a723f35d3b8da35124019c6d
7
- data.tar.gz: 0070c3a2dc460fe286090ebaf0428a8697b2d0429df770542eda1b5c9f69e6c733caad05e230ab6be5d12ac75967a37be35b7264c28d3fc1f05da0c5f003e328
6
+ metadata.gz: d91037cce674c4202e56d28489e38275942a4e4fe7546485b4f16cac06f35e97185741eb995896a0b02e06b2b8da7fea5259adf25af964dd01f1a9089e988d56
7
+ data.tar.gz: da6b2222a76dca27280e79367260ad1512b07b78400f3cede0e97448f96aefaf139e7ce9d40d41a442c42f3e1103f52cb25df2ee55c3a17e2c4762ed17d6e07d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,60 @@
1
+ ## 2.1.4 - 2026-11-20
2
+
3
+ No change to Startback itself. This release exists to rebuild the docker
4
+ images on a patched Ruby. **Pull the new images and redeploy**; an
5
+ application that installs the gem on its own Ruby has to upgrade that Ruby
6
+ instead.
7
+
8
+ ### Images rebuilt on Ruby 3.4.13 and 4.0.10
9
+
10
+ Ruby published a [security advisory](https://www.ruby-lang.org/en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string/)
11
+ on 2026-11-18: seven vulnerabilities in the regular expression engine and in
12
+ the case conversion of strings, several of them with a proof of concept
13
+ leading to remote code execution. Ruby 3.4.0 through 3.4.12 and 4.0.0 through
14
+ 4.0.9 are affected.
15
+
16
+ The 2.1.3 images were built on 3.4.12 and 4.0.9. Since they follow `ruby:3.4`
17
+ and `ruby:4.0`, building them again is all it takes:
18
+
19
+ | Tags | Ruby in 2.1.3 | Ruby in 2.1.4 |
20
+ |---|---|---|
21
+ | `:api`, `:web`, `-ruby3.4` | 3.4.12 | 3.4.13 |
22
+ | `-ruby4.0` | 4.0.9 | 4.0.10 |
23
+
24
+ The floating tags -- `:api`, `:api-2.1`, `:api-2.1-ruby4.0` and their `web`
25
+ counterparts -- move to the new build, so a fresh pull is enough there. A tag
26
+ pinned to a patch version does not move: `api-2.1.3` stays on the affected
27
+ Ruby and has to become `api-2.1.4`.
28
+
29
+ ## 2.1.3 - 2026-10-29
30
+
31
+ A one-character fix to AutoCaching's production policy. **Nothing to do, and
32
+ nothing changes for an application that kept the default** -- but the knob it
33
+ unlocks is worth knowing about.
34
+
35
+ ### `s-maxage`, not `s-max-age`
36
+
37
+ The default production policy read `public, must-revalidate, max-age=3600,
38
+ s-max-age=3600`. There is no `s-max-age` directive: caches skip what they do
39
+ not recognise, so a shared cache had nothing but `max-age` to go by. Same
40
+ hour either way, which is why this went unnoticed -- the two values were
41
+ equal.
42
+
43
+ It matters the moment they should not be. A page whose reverse proxy should
44
+ hold it for an hour while the browser comes back in a minute is exactly what
45
+ `s-maxage` is for, and overriding the policy to say so had no effect on the
46
+ proxy:
47
+
48
+ ```ruby
49
+ # Now does what it says: one minute in the browser, one hour in nginx.
50
+ use Startback::Web::AutoCaching, production: "public, max-age=60, s-maxage=3600"
51
+ ```
52
+
53
+ Worth a look if your application already overrides
54
+ `PRODUCTION_CACHE_CONTROL`, or sets
55
+ `STARTBACK_AUTOCACHING_PRODUCTION_CACHE_CONTROL`, with a `s-max-age` copied
56
+ from the default: it was being ignored, and now it is not.
57
+
1
58
  ## 2.1.2 - 2026-10-27
2
59
 
3
60
  A crawler could take a page down for everyone. **AutoCaching's fix needs
@@ -2,7 +2,7 @@ module Startback
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 1
5
- TINY = 2
5
+ TINY = 4
6
6
  end
7
7
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
8
8
  end
@@ -51,9 +51,13 @@ module Startback
51
51
  DEVELOPMENT_CACHE_CONTROL = ENV['STARTBACK_AUTOCACHING_DEVELOPMENT_CACHE_CONTROL'] || \
52
52
  "no-cache, no-store, max-age=0, must-revalidate"
53
53
 
54
- # Cache-Control header to use in production mode
54
+ # Cache-Control header to use in production mode. `s-maxage`, and not
55
+ # `s-max-age`: the latter is not a directive any cache knows, so it was
56
+ # silently dropped and a shared cache had nothing but `max-age` to go by
57
+ # -- the very knob an application needs to keep a page in its reverse
58
+ # proxy for an hour while the browser comes back in a minute.
55
59
  PRODUCTION_CACHE_CONTROL = ENV['STARTBACK_AUTOCACHING_PRODUCTION_CACHE_CONTROL'] ||\
56
- "public, must-revalidate, max-age=3600, s-max-age=3600"
60
+ "public, must-revalidate, max-age=3600, s-maxage=3600"
57
61
 
58
62
  # Cache-Control header to use on an error response, in either mode
59
63
  ERROR_CACHE_CONTROL = ENV['STARTBACK_AUTOCACHING_ERROR_CACHE_CONTROL'] ||\
@@ -30,7 +30,7 @@ module Startback
30
30
 
31
31
  it 'sets the production Cache-Control' do
32
32
  get '/'
33
- expect(last_response['Cache-Control']). to eql("public, must-revalidate, max-age=3600, s-max-age=3600")
33
+ expect(last_response['Cache-Control']). to eql("public, must-revalidate, max-age=3600, s-maxage=3600")
34
34
  end
35
35
  end
36
36
 
@@ -88,7 +88,7 @@ module Startback
88
88
  end
89
89
 
90
90
  it 'still makes a redirect cacheable' do
91
- expect(cache_control_for(301)).to eql("public, must-revalidate, max-age=3600, s-max-age=3600")
91
+ expect(cache_control_for(301)).to eql("public, must-revalidate, max-age=3600, s-maxage=3600")
92
92
  end
93
93
  end
94
94
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: startback
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-10-27 00:00:00.000000000 Z
10
+ date: 2026-11-20 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rspec
@@ -576,7 +575,6 @@ homepage: https://www.enspirit.be
576
575
  licenses:
577
576
  - MIT
578
577
  metadata: {}
579
- post_install_message:
580
578
  rdoc_options: []
581
579
  require_paths:
582
580
  - lib
@@ -591,8 +589,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
591
589
  - !ruby/object:Gem::Version
592
590
  version: '0'
593
591
  requirements: []
594
- rubygems_version: 3.4.20
595
- signing_key:
592
+ rubygems_version: 3.6.7
596
593
  specification_version: 4
597
594
  summary: Got Your Ruby Back
598
595
  test_files: []