Skip to content

[v4.2] Fix unsafe html view component, allow ViewComponent 3.21+#6072

Closed
tvdeyen wants to merge 1 commit intov4.2from
backport/v4.2/pr-6055
Closed

[v4.2] Fix unsafe html view component, allow ViewComponent 3.21+#6072
tvdeyen wants to merge 1 commit intov4.2from
backport/v4.2/pr-6055

Conversation

@tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Jan 15, 2025

Backport

This will backport the following commits from main to v4.2:

Questions ?

Please refer to the Backport tool documentation

@tvdeyen tvdeyen requested a review from a team as a code owner January 15, 2025 16:20
@tvdeyen tvdeyen added backport-v4.1 Backport this pull-request to v4.1 backport-v4.2 Backport this pull-request to v4.2 backport-v4.3 Backport this pull-request to v4.3 backport-v4.4 Backport this pull-request to v4.4 changelog:solidus_admin labels Jan 15, 2025
@tvdeyen tvdeyen removed backport-v4.1 Backport this pull-request to v4.1 backport-v4.2 Backport this pull-request to v4.2 backport-v4.3 Backport this pull-request to v4.3 backport-v4.4 Backport this pull-request to v4.4 labels Jan 15, 2025
@tvdeyen tvdeyen force-pushed the backport/v4.2/pr-6055 branch from 2cf0352 to ffcddbe Compare January 15, 2025 17:37
The mock component in the ComponentHelpers module was not a real
constant, which messes with ViewComponent's expectations about what
render_inline is given. Using `stub_const` in the helper allows us to
give it an actual name, and view_component > 3.21.0 will work for us.

The helper is only used in the base component spec. I could have spent
more time giving it an optional block, but this solution is the most
straightforward.

(cherry picked from commit 228ca12)

# Conflicts:
#	admin/lib/solidus_admin/testing_support/component_helpers.rb
#	admin/spec/components/solidus_admin/base_component_spec.rb
@tvdeyen tvdeyen force-pushed the backport/v4.2/pr-6055 branch from ffcddbe to 9de4dc4 Compare January 24, 2025 15:33
@fthobe
Copy link
Contributor

fthobe commented Feb 7, 2025

@jarednorman can we merge this?

@tvdeyen tvdeyen closed this Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants