security update for entity api

This commit is contained in:
2018-04-20 23:55:10 +02:00
parent 8a05ca54b2
commit 57376251fa
9 changed files with 54 additions and 23 deletions

View File

@@ -673,7 +673,7 @@ function entity_metadata_no_hook_node_access($op, $node = NULL, $account = NULL)
if (empty($node->vid) && in_array($op, array('create', 'update'))) {
// This is a new node or the original node.
if (isset($node->type)) {
$op = !empty($node->is_new) && $node->is_new ? 'create' : 'update';
$op = empty($node->nid) || !empty($node->is_new) ? 'create' : 'update';
return node_access($op, $op == 'create' ? $node->type : $node, $account);
}
else {