From a70522881e3b32483a1d0905683c1537c80b1e8d Mon Sep 17 00:00:00 2001
From: Steven Wittens <steven@10.no-reply.drupal.org>
Date: Tue, 14 Mar 2006 15:20:41 +0000
Subject: [PATCH] - #53857: External URL suppor for menus broken by SA-2006-001

---
 includes/menu.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/includes/menu.inc b/includes/menu.inc
index 4f43f0afa8cf..69fa748fa66e 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -1125,7 +1125,10 @@ function _menu_item_is_accessible($mid) {
     $path = substr($path, 0, strrpos($path, '/'));
   }
   if (empty($path)) {
-    return FALSE;
+    // Items without any access attribute up the chain are denied, unless they
+    // were created by the admin. They most likely point to non-Drupal directories
+    // or to an external URL and should be allowed.
+    return $menu['items'][$mid]['type'] & MENU_CREATED_BY_ADMIN;
   }
   return $menu['items'][$menu['path index'][$path]]['access'];
 }
-- 
GitLab