Skip to content

Commit f8f987c

Browse files
authored
Merge branch 'main' into experimentally-cacheable
2 parents c6b64df + efc3085 commit f8f987c

23 files changed

Lines changed: 258 additions & 59 deletions

‎.github/workflows/publish-release.yml‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
78

89
permissions:
910
contents: read
@@ -16,18 +17,26 @@ jobs:
1617
permissions:
1718
contents: write
1819
pull-requests: read
19-
# Only run if this is a release commit (created by script/release)
20-
if: startsWith(github.event.head_commit.message, 'release ')
20+
# Only run if this is a release commit created by script/release.
21+
# Match either the direct commit message from script/release
22+
# ("release X.Y.Z") or the merge-commit body containing the release
23+
# PR title ("Release X.Y.Z"), so a normal PR merge still triggers.
24+
# Also always run on manual workflow_dispatch.
25+
if: |
26+
github.event_name == 'workflow_dispatch' ||
27+
startsWith(github.event.head_commit.message, 'release ') ||
28+
contains(github.event.head_commit.message, 'Release ')
2129
steps:
2230
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
2331
with:
2432
fetch-depth: 0
2533
token: ${{ secrets.GITHUB_TOKEN }}
26-
persist-credentials: false
34+
persist-credentials: true
2735

2836
- name: Set up Ruby
2937
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b
3038
with:
39+
ruby-version: 4.0
3140
bundler-cache: true
3241

3342
- name: Harden runner

‎.github/workflows/push_gem.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- v*
7+
workflow_dispatch:
78

89
permissions:
910
contents: read

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,12 @@ jobs:
109109
with:
110110
fetch-depth: 0
111111
token: ${{ secrets.GITHUB_TOKEN }}
112-
persist-credentials: false
112+
persist-credentials: true
113113

114114
- name: Set up Ruby
115115
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b
116116
with:
117+
ruby-version: 4.0
117118
bundler-cache: true
118119

119120
- name: Configure git

‎Gemfile.lock‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
view_component (4.13.0)
4+
view_component (4.14.0)
55
actionview (>= 7.1.0)
66
activesupport (>= 7.1.0)
77
concurrent-ruby (~> 1)
@@ -644,7 +644,7 @@ CHECKSUMS
644644
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
645645
uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
646646
useragent (0.16.11) sha256=700e6413ad4bb954bb63547fa098dddf7b0ebe75b40cc6f93b8d54255b173844
647-
view_component (4.13.0)
647+
view_component (4.14.0)
648648
warning (1.6.0) sha256=a49cdfae19fb77d19afff2efbe45f8ab759e9cd25b4e4ce2c79dbaf46bdb6c9e
649649
webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
650650
websocket (1.2.11) sha256=b7e7a74e2410b5e85c25858b26b3322f29161e300935f70a0e0d3c35e0462737

‎docs/CHANGELOG.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ nav_order: 6
3434

3535
*Reegan Viljoen*, *Godfrey Chan*, *JWShuff*, *timburgan*, *Patrick Arnett*, *ozzyaaron*, *pinzonjulian*, *Derek Kniffin*, *cannikin*, *rnestler*, *Joel Hawksley*
3636

37+
## 4.14.0
38+
39+
* Freeze `ReusedInstanceError::MESSAGE` and update `test_renders_component_with_asset_url` to build a fresh `AssetComponent` per render, fixing CI regressions introduced by the GHSA-8qw7-6phv-7q6p remediation.
40+
41+
*Joel Hawksley*
42+
43+
* [Security] Fix incomplete remediation for CVE-2026-54497 (GHSA-8qw7-6phv-7q6p): reused ViewComponent instances could still leak `with_content` and `renders_one`/`renders_many` slot content from an earlier render into a later render because slot state and content set via `with_content` are populated by the caller before `render_in` runs and were not cleared by the previous per-render reset. Reinstate the `ViewComponent::ReusedInstanceError` guard that raises when a component instance is rendered more than once. Rebuild collection child components per render and dup collection spacer components before each render so that legitimate re-rendering of `Collection`/spacer objects continues to work.
44+
45+
*Yazan Balawneh, Cystack.ps*
46+
3747
* Update GitHub Actions workflows to use `actions/checkout` v7.
3848

3949
*Richard Macklin*

‎docs/_data/contributors.yml‎

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
---
22
usernames:
3+
- 23tux
34
- adillari
45
- adrianthedev
56
- aduth
67
- agrobbin
7-
- allan-pires
88
- allmarkedup
99
- alvincrespo
1010
- amhol
1111
- andrewjtait
1212
- andrewmcodes
1313
- andreyazimov
14+
- andypple83
15+
- andyw8
16+
- armstrjare
17+
- aronmoshe-m
18+
- artinboghosian
1419
- asgerb
1520
- avinoth
1621
- ayushn21
1722
- bankair
1823
- baygeldin
1924
- bdewater
2025
- being-frank
26+
- bensheldon
2127
- berniechiu
2228
- betogrun
2329
- bigbigdoudou
@@ -43,6 +49,7 @@ usernames:
4349
- claudiob
4450
- cllns
4551
- compostbrain
52+
- copilot
4653
- cover
4754
- crookedgrin
4855
- cyupa
@@ -59,6 +66,7 @@ usernames:
5966
- dixpac
6067
- dkniffin
6168
- dlinch
69+
- dmrwebdev
6270
- donapieppo
6371
- dpaola2
6472
- drbragg
@@ -84,11 +92,13 @@ usernames:
8492
- fugufish
8593
- fwolfst
8694
- g13ydson
95+
- george-bit
8796
- github-actions[bot]
8897
- gonzric1
8998
- grekko
9099
- guillaumebriday
91100
- hachi8833
101+
- hakanensari
92102
- halo
93103
- henrikbjorn
94104
- hirurg103
@@ -99,6 +109,8 @@ usernames:
99109
- htcarr3
100110
- igor-drozdov
101111
- ihollander
112+
- j127
113+
- jackozi
102114
- jacob-carlborg-apoex
103115
- janklimo
104116
- jaredcwhite
@@ -108,6 +120,7 @@ usernames:
108120
- jcoyne
109121
- jdelstrother
110122
- jdennes
123+
- jell
111124
- jess
112125
- joelhawksley
113126
- jogetblock
@@ -118,6 +131,8 @@ usernames:
118131
- joshmgross
119132
- joshuaclayton
120133
- jpbalarini
134+
- jrochkind
135+
- jsolas
121136
- juanmanuelramallo
122137
- jwshuff
123138
- jyunderwood
@@ -130,6 +145,7 @@ usernames:
130145
- kenyonj
131146
- khiga8
132147
- konnorrogers
148+
- koppen
133149
- krazylegz
134150
- kulturbande
135151
- kylefox
@@ -138,14 +154,16 @@ usernames:
138154
- leighhalliday
139155
- lfalcao
140156
- llenk
157+
- lucasgeron
141158
- luccastera
159+
- luizkowalski
142160
- lxxxvi
143161
- lyams
144162
- mamhoff
145163
- manuelpuyol
146164
- marckohlbrugge
147165
- marcoroth
148-
- matheuspolicamilo
166+
- matheus-poli
149167
- matheusrich
150168
- matt-yorkley
151169
- mattbearman
@@ -156,19 +174,18 @@ usernames:
156174
- mbuckley
157175
- mec
158176
- meganemura
159-
- mellowfish
160177
- meneerprins
161178
- metade
162179
- mhw
163180
- michaelem
164181
- mikemcquaid
165182
- mikepmunroe
183+
- mikz
166184
- milk1000cc
167-
- mitchellhenke
168185
- mixergtz
169186
- mkanakana
170187
- mkdynamic
171-
- moekiorg
188+
- moeki0
172189
- mrjonesbot
173190
- mrloop
174191
- mrrooijen
@@ -216,10 +233,11 @@ usernames:
216233
- richardmarbach
217234
- rickychilcott
218235
- rmacklin
236+
- robrieba
219237
- romaricpascal
238+
- rordevelopernik
220239
- rubensmit
221240
- rylanb
222-
- ryogift
223241
- sahglie
224242
- salazarjosh
225243
- sammyhenningsson
@@ -232,6 +250,7 @@ usernames:
232250
- skryukov
233251
- smashwilson
234252
- sn3p
253+
- snepote
235254
- spdawson
236255
- spone
237256
- srt32
@@ -240,20 +259,24 @@ usernames:
240259
- sunny
241260
- svetlins
242261
- swanson
262+
- talentohq
243263
- talltorp
244264
- talum
245265
- tastypi
246266
- tclem
247267
- tdak
248268
- tgaff
269+
- thewatts
249270
- thomascchen
250271
- thutterer
251272
- tkowalewski
252273
- tmaier
253274
- tmbv93
254275
- tmecklem
276+
- tom-lord
255277
- tomasc
256278
- tonkpils
279+
- torgilz
257280
- traels
258281
- triskweline
259282
- tysongach

‎docs/_data/library.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: 4.13.0
1+
version: 4.14.0

‎docs/api.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,14 @@ COMPONENT declares a slot named SLOT_NAME, which is a reserved word in the ViewC
565565

566566
To fix this issue, choose a different name.
567567

568+
### `ReusedInstanceError`
569+
570+
ViewComponent instances are single-use; a COMPONENT instance was rendered more than once.
571+
572+
Reusing a component instance across renders can leak request-scoped state (controller, helpers, request, view_flow, slot content, `with_content`) from an earlier render into a later one, which has security and correctness implications (GHSA-8qw7-6phv-7q6p).
573+
574+
To fix this issue, create a new component instance per render.
575+
568576
### `SlotPredicateNameError`
569577

570578
COMPONENT declares a slot named SLOT_NAME, which ends with a question mark.

‎docs/resources.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ _Is this page missing a link? Open a PR!_
1414
- [GOV.UK Rails Components](https://govuk-components.x-govuk.org/)
1515
- [Polaris ViewComponents](https://github.com/baoagency/polaris_view_components)
1616
- [Rails Designer](https://railsdesigner.com/)
17+
- [Flowbite Components](https://flowbite-components.substancelab.com)
1718

1819
## Frameworks using ViewComponent
1920

‎gemfiles/rails_7.1.gemfile.lock‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
view_component (4.13.0)
4+
view_component (4.14.0)
55
actionview (>= 7.1.0)
66
activesupport (>= 7.1.0)
77
concurrent-ruby (~> 1)

0 commit comments

Comments
 (0)