diff --git a/Gemfile.lock b/Gemfile.lock index d9edef752..537c0f32b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - view_component (4.13.0) + view_component (4.14.0) actionview (>= 7.1.0) activesupport (>= 7.1.0) concurrent-ruby (~> 1) @@ -644,7 +644,7 @@ CHECKSUMS unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 useragent (0.16.11) sha256=700e6413ad4bb954bb63547fa098dddf7b0ebe75b40cc6f93b8d54255b173844 - view_component (4.13.0) + view_component (4.14.0) warning (1.6.0) sha256=a49cdfae19fb77d19afff2efbe45f8ab759e9cd25b4e4ce2c79dbaf46bdb6c9e webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131 websocket (1.2.11) sha256=b7e7a74e2410b5e85c25858b26b3322f29161e300935f70a0e0d3c35e0462737 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 52c12fd73..aa688702c 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,8 @@ nav_order: 6 ## main +## 4.14.0 + * 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. *Joel Hawksley* diff --git a/docs/_data/contributors.yml b/docs/_data/contributors.yml index 27afccf10..9f8986841 100644 --- a/docs/_data/contributors.yml +++ b/docs/_data/contributors.yml @@ -1,16 +1,21 @@ --- usernames: +- 23tux - adillari - adrianthedev - aduth - agrobbin -- allan-pires - allmarkedup - alvincrespo - amhol - andrewjtait - andrewmcodes - andreyazimov +- andypple83 +- andyw8 +- armstrjare +- aronmoshe-m +- artinboghosian - asgerb - avinoth - ayushn21 @@ -18,6 +23,7 @@ usernames: - baygeldin - bdewater - being-frank +- bensheldon - berniechiu - betogrun - bigbigdoudou @@ -43,6 +49,7 @@ usernames: - claudiob - cllns - compostbrain +- copilot - cover - crookedgrin - cyupa @@ -59,6 +66,7 @@ usernames: - dixpac - dkniffin - dlinch +- dmrwebdev - donapieppo - dpaola2 - drbragg @@ -84,11 +92,13 @@ usernames: - fugufish - fwolfst - g13ydson +- george-bit - github-actions[bot] - gonzric1 - grekko - guillaumebriday - hachi8833 +- hakanensari - halo - henrikbjorn - hirurg103 @@ -99,6 +109,8 @@ usernames: - htcarr3 - igor-drozdov - ihollander +- j127 +- jackozi - jacob-carlborg-apoex - janklimo - jaredcwhite @@ -108,6 +120,7 @@ usernames: - jcoyne - jdelstrother - jdennes +- jell - jess - joelhawksley - jogetblock @@ -118,6 +131,8 @@ usernames: - joshmgross - joshuaclayton - jpbalarini +- jrochkind +- jsolas - juanmanuelramallo - jwshuff - jyunderwood @@ -130,6 +145,7 @@ usernames: - kenyonj - khiga8 - konnorrogers +- koppen - krazylegz - kulturbande - kylefox @@ -138,14 +154,16 @@ usernames: - leighhalliday - lfalcao - llenk +- lucasgeron - luccastera +- luizkowalski - lxxxvi - lyams - mamhoff - manuelpuyol - marckohlbrugge - marcoroth -- matheuspolicamilo +- matheus-poli - matheusrich - matt-yorkley - mattbearman @@ -156,19 +174,18 @@ usernames: - mbuckley - mec - meganemura -- mellowfish - meneerprins - metade - mhw - michaelem - mikemcquaid - mikepmunroe +- mikz - milk1000cc -- mitchellhenke - mixergtz - mkanakana - mkdynamic -- moekiorg +- moeki0 - mrjonesbot - mrloop - mrrooijen @@ -216,10 +233,11 @@ usernames: - richardmarbach - rickychilcott - rmacklin +- robrieba - romaricpascal +- rordevelopernik - rubensmit - rylanb -- ryogift - sahglie - salazarjosh - sammyhenningsson @@ -232,6 +250,7 @@ usernames: - skryukov - smashwilson - sn3p +- snepote - spdawson - spone - srt32 @@ -240,20 +259,24 @@ usernames: - sunny - svetlins - swanson +- talentohq - talltorp - talum - tastypi - tclem - tdak - tgaff +- thewatts - thomascchen - thutterer - tkowalewski - tmaier - tmbv93 - tmecklem +- tom-lord - tomasc - tonkpils +- torgilz - traels - triskweline - tysongach diff --git a/docs/_data/library.yml b/docs/_data/library.yml index ccc13e92b..1f21108c1 100644 --- a/docs/_data/library.yml +++ b/docs/_data/library.yml @@ -1 +1 @@ -version: 4.13.0 +version: 4.14.0 diff --git a/docs/api.md b/docs/api.md index 9c669f8b4..dec5e1aa4 100644 --- a/docs/api.md +++ b/docs/api.md @@ -551,6 +551,14 @@ COMPONENT declares a slot named SLOT_NAME, which is a reserved word in the ViewC To fix this issue, choose a different name. +### `ReusedInstanceError` + +ViewComponent instances are single-use; a COMPONENT instance was rendered more than once. + +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). + +To fix this issue, create a new component instance per render. + ### `SlotPredicateNameError` COMPONENT declares a slot named SLOT_NAME, which ends with a question mark. diff --git a/gemfiles/rails_7.1.gemfile.lock b/gemfiles/rails_7.1.gemfile.lock index 3905130ef..d72e0b735 100644 --- a/gemfiles/rails_7.1.gemfile.lock +++ b/gemfiles/rails_7.1.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - view_component (4.13.0) + view_component (4.14.0) actionview (>= 7.1.0) activesupport (>= 7.1.0) concurrent-ruby (~> 1) diff --git a/gemfiles/rails_7.2.gemfile.lock b/gemfiles/rails_7.2.gemfile.lock index 3036cc0a7..54a7afaba 100644 --- a/gemfiles/rails_7.2.gemfile.lock +++ b/gemfiles/rails_7.2.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - view_component (4.13.0) + view_component (4.14.0) actionview (>= 7.1.0) activesupport (>= 7.1.0) concurrent-ruby (~> 1) diff --git a/gemfiles/rails_8.0.gemfile.lock b/gemfiles/rails_8.0.gemfile.lock index a0ea78ff5..fb7e49c94 100644 --- a/gemfiles/rails_8.0.gemfile.lock +++ b/gemfiles/rails_8.0.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - view_component (4.13.0) + view_component (4.14.0) actionview (>= 7.1.0) activesupport (>= 7.1.0) concurrent-ruby (~> 1) diff --git a/gemfiles/rails_8.1.gemfile.lock b/gemfiles/rails_8.1.gemfile.lock index 4e6965ad6..348c90579 100644 --- a/gemfiles/rails_8.1.gemfile.lock +++ b/gemfiles/rails_8.1.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - view_component (4.13.0) + view_component (4.14.0) actionview (>= 7.1.0) activesupport (>= 7.1.0) concurrent-ruby (~> 1) diff --git a/gemfiles/rails_main.gemfile.lock b/gemfiles/rails_main.gemfile.lock index d025d8a7d..dbb77d5ed 100644 --- a/gemfiles/rails_main.gemfile.lock +++ b/gemfiles/rails_main.gemfile.lock @@ -110,7 +110,7 @@ GIT PATH remote: .. specs: - view_component (4.13.0) + view_component (4.14.0) actionview (>= 7.1.0) activesupport (>= 7.1.0) concurrent-ruby (~> 1) @@ -641,7 +641,7 @@ CHECKSUMS unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 useragent (0.16.11) sha256=700e6413ad4bb954bb63547fa098dddf7b0ebe75b40cc6f93b8d54255b173844 - view_component (4.13.0) + view_component (4.14.0) warning (1.6.0) sha256=a49cdfae19fb77d19afff2efbe45f8ab759e9cd25b4e4ce2c79dbaf46bdb6c9e webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131 websocket (1.2.11) sha256=b7e7a74e2410b5e85c25858b26b3322f29161e300935f70a0e0d3c35e0462737 diff --git a/gemfiles/rails_main_head.gemfile.lock b/gemfiles/rails_main_head.gemfile.lock index dae9fa5f7..f85335583 100644 --- a/gemfiles/rails_main_head.gemfile.lock +++ b/gemfiles/rails_main_head.gemfile.lock @@ -110,7 +110,7 @@ GIT PATH remote: .. specs: - view_component (4.13.0) + view_component (4.14.0) actionview (>= 7.1.0) activesupport (>= 7.1.0) concurrent-ruby (~> 1) @@ -585,7 +585,7 @@ CHECKSUMS unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 useragent (0.16.11) sha256=700e6413ad4bb954bb63547fa098dddf7b0ebe75b40cc6f93b8d54255b173844 - view_component (4.13.0) + view_component (4.14.0) warning (1.6.0) sha256=a49cdfae19fb77d19afff2efbe45f8ab759e9cd25b4e4ce2c79dbaf46bdb6c9e webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131 websocket (1.2.11) sha256=b7e7a74e2410b5e85c25858b26b3322f29161e300935f70a0e0d3c35e0462737 diff --git a/lib/view_component/version.rb b/lib/view_component/version.rb index 3f92d4dee..5a2b5ba7d 100644 --- a/lib/view_component/version.rb +++ b/lib/view_component/version.rb @@ -3,7 +3,7 @@ module ViewComponent module VERSION MAJOR = 4 - MINOR = 13 + MINOR = 14 PATCH = 0 PRE = nil