diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-05-01 08:12:23 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-05-01 08:12:23 +0000 |
commit | 71713081a2b79b0baa024742cdbb4af536f77f4b (patch) | |
tree | e9bc0d309856beb05a6fae67fdbdd75c59ccef9f /includes/menu.inc | |
parent | 2a2f4cc0be547f515ccd4212e9aeca7765a4968b (diff) | |
download | brdo-71713081a2b79b0baa024742cdbb4af536f77f4b.tar.gz brdo-71713081a2b79b0baa024742cdbb4af536f77f4b.tar.bz2 |
- Patch #723802 by pwolanin, grendzy: convert to sha-256 and hmac from md5 and sha1.
Diffstat (limited to 'includes/menu.inc')
-rw-r--r-- | includes/menu.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index 8c2255067..f2e33002b 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -407,9 +407,9 @@ function menu_get_item($path = NULL, $router_item = NULL) { $parts = array_slice($original_map, 0, MENU_MAX_PARTS); $ancestors = menu_get_ancestors($parts); - // Since there is no limit to the length of $path, but the cids are - // restricted to 255 characters, use md5() to keep it short yet unique. - $cid = 'menu_item:' . md5($path); + // Since there is no limit to the length of $path, use a hash to keep it + // short yet unique. + $cid = 'menu_item:' . hash('sha256', $path); if ($cached = cache_get($cid, 'cache_menu')) { $router_item = $cached->data; } @@ -1238,7 +1238,7 @@ function menu_tree_page_data($menu_name, $max_depth = NULL) { * Helper function - compute the real cache ID for menu tree data. */ function _menu_tree_cid($menu_name, $data) { - return 'links:' . $menu_name . ':tree-data:' . $GLOBALS['language']->language . ':' . md5(serialize($data)); + return 'links:' . $menu_name . ':tree-data:' . $GLOBALS['language']->language . ':' . hash('sha256', serialize($data)); } /** |