Generated with the help of an LLM.

Problem/Motivation

The third-party settings endpoint, /api/display-builder/{display_builder_instance}/_node/{node_id}/settings/{island_id}, only checks update access on the instance.

It accepts any island with a form, enabled in the profile or not. A profile that disables Styles or Visibility conditions, such as the editor profile of #3620224: Add an editor profile config for entity view overrides, hides their forms, but a PUT to the endpoint still saves them.

#3548769: Security: availability of endpoints according to islands gated publish, restore, revert and save as preset on their island, and #3637737: Gate the paste and clear styles routes on the Styles menu island did it for paste and delete styles. This route is the one left.

Steps to reproduce

1. Use a profile with the Styles island disabled.
2. PUT a styles form payload to the settings endpoint of a node.
3. The node's styles are saved.

Proposed resolution

Let IslandAccessCheck read the island from the {island_id} route parameter, and require it on this route.

Comments

mogtofu33 created an issue.