From b83b34018f38006c7a099e8d6f9853a23ffc8633 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 29 Nov 2004 12:49:17 +0000 Subject: - Patch #10697 by matteo: avoid that administrators can create nodes with the wrong node type. --- modules/node.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/node.module') diff --git a/modules/node.module b/modules/node.module index 5302b20fd..dc4e3638c 100644 --- a/modules/node.module +++ b/modules/node.module @@ -1271,7 +1271,7 @@ function node_add($type) { $edit = $_POST['edit']; // If a node type has been specified, validate its existence. - if ($type && node_access('create', $type)) { + if (in_array($type, node_list()) && node_access('create', $type)) { // Initialize settings: $node = array('uid' => $user->uid, 'name' => $user->name, 'type' => $type); -- cgit v1.2.3