Generated with the help of an LLM.
Problem/Motivation
The entity_embed.edit_embedded_entity route (/entity-embed/edit-embedded/{type}/{uuid}) has _access: 'TRUE'. Anyone, including anonymous users, can request it: for an existing entity it redirects to the entity's edit form, which reveals that the entity exists and what its ID is. The edit form still checks access, so this doesn't let anyone edit an entity they couldn't before.
Follow-up from #3402443: PHP error: Call to a member function id() on null.
Proposed resolution
Return a 403 unless the current user has update access to the entity, checked in EditEmbeddedEntity::edit() or with a custom access check on the route. Keep the 404 for entities that don't exist or have no edit form.
Remaining tasks
- Add the access check and a test for a user without update access.
Comments
Comment #2
dave reid