diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php index ebae468..6cce4b0 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php @@ -295,7 +295,7 @@ public function generateResultsKey() { } } - $this->resultsKey = $this->view->storage->get('name') . ':' . $this->displayHandler->display['id'] . ':results:' . md5(serialize($key_data)); + $this->resultsKey = $this->view->storage->get('name') . ':' . $this->displayHandler->display['id'] . ':results:' . hash('sha256', serialize($key_data)); } return $this->resultsKey; @@ -319,7 +319,7 @@ public function generateOutputKey() { 'base_url' => $GLOBALS['base_url'], ); - $this->outputKey = $this->view->storage->get('name') . ':' . $this->displayHandler->display['id'] . ':output:' . md5(serialize($key_data)); + $this->outputKey = $this->view->storage->get('name') . ':' . $this->displayHandler->display['id'] . ':output:' . hash('sha256', serialize($key_data)); } return $this->outputKey; diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php index 06780c3..a9d79ba 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php @@ -130,7 +130,7 @@ public function initDisplay(ViewExecutable $view, array &$display, array &$optio // Cache for unpackOptions, but not if we are in the ui. static $unpack_options = array(); if (empty($view->editing)) { - $cid = 'unpackOptions:' . md5(serialize(array($this->options, $options))); + $cid = 'unpackOptions:' . hash('sha256', serialize(array($this->options, $options))); if (empty($unpack_options[$cid])) { $cache = views_cache_get($cid, TRUE); if (!empty($cache->data)) { diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php index d577365..1fd2c22 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php @@ -556,7 +556,7 @@ function render_grouping($records, $groupings = array(), $group_rendered = NULL) // Not all field handlers return a scalar value, // e.g. views_handler_field_field. if (!is_scalar($grouping)) { - $grouping = md5(serialize($grouping)); + $grouping = hash('sha256', serialize($grouping)); } } } diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index ec1fc6d..1b6e4fc 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -1413,7 +1413,7 @@ public function preExecute($args = array()) { } // Allow hook_views_pre_view() to set the dom_id, then ensure it is set. - $this->dom_id = !empty($this->dom_id) ? $this->dom_id : md5($this->storage->get('name') . REQUEST_TIME . rand()); + $this->dom_id = !empty($this->dom_id) ? $this->dom_id : hash('sha256', $this->storage->get('name') . REQUEST_TIME . mt_rand()); // Allow the display handler to set up for execution $this->display_handler->preExecute();