- Issue created by @larowlan
This was originally reported as a private issue and the security team decided it could be handled in public
When there is an implementation of hook_entity_access this is not taken into account by entity reference selection handlers.
/**
* Implements hook_ENTITY_TYPE_access().
*/
function HOOK_node_access(NodeInterface $node): AccessResultInterface {
return AccessResult::forbiddenIf($node->id() == 1);
}
The issue also happens when autocompletion widget is used.
When there is no access to 'view label' for a result, show Node: 3
or similar - e.g. {Entity type label}: {Entity type id}
Active
11.0 π₯
It makes Drupal less vulnerable to abuse or misuse. Note, this is the preferred tag, though the Security tag has a large body of issues tagged to it. Do NOT publicly disclose security vulnerabilities; contact the security team instead. Anyone (whether security team or not) can apply this tag to security improvements that do not directly present a vulnerability e.g. hardening an API to add filtering to reduce a common mistake in contributed modules.