diff -u b/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php --- b/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -669,7 +669,7 @@ $attributes = new Attribute(); $attributes['callback'] = $placeholder_render_array['#lazy_builder'][0]; $attributes['arguments'] = UrlHelper::buildQuery($placeholder_render_array['#lazy_builder'][1]); - $attributes['token'] = crc32(serialize($placeholder_render_array)); + $attributes['token'] = hash('sha1', serialize($placeholder_render_array)); $placeholder_markup = SafeMarkup::format('', ['@attributes' => $attributes]); // Build the placeholder element to return. @@ -707,7 +707,7 @@ $attributes = new Attribute(); $attributes['callback'] = $placeholder_render_array['#lazy_builder'][0]; $attributes['arguments'] = UrlHelper::buildQuery($placeholder_render_array['#lazy_builder'][1]); - $attributes['token'] = hash('sha1', serialize($placeholder_render_array)); + $attributes['token'] = hash('crc32', serialize($placeholder_render_array)); $placeholder_markup = SafeMarkup::format('', ['@attributes' => $attributes]); // Build the placeholder element to return. diff -u b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php --- b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php @@ -61,14 +61,14 @@ else { unset($token_render_array['#cache']); } - $token = crc32(serialize($token_render_array)); + $token = hash('sha1', serialize($token_render_array)); return SafeMarkup::format('', [ '@callback' => 'Drupal\Tests\Core\Render\PlaceholdersTest::callback', '@arguments' => '0=' . $args[0], if (is_array($cache_keys)) { $token_render_array['#cache']['keys'] = $cache_keys; } - $token = hash('sha1', serialize($token_render_array)); + $token = hash('crc32', serialize($token_render_array)); return SafeMarkup::format('', [ '@callback' => 'Drupal\Tests\Core\Render\PlaceholdersTest::callback', '@arguments' => '0=' . $args[0], @@ -275,7 +275,7 @@ $expected_placeholder_render_array['#cache']['keys'] = $placeholder_cid_keys; } $expected_placeholder_render_array['#lazy_builder'] = ['Drupal\Tests\Core\Render\PlaceholdersTest::callback', $args]; - $token = crc32(serialize($expected_placeholder_render_array)); + $token = hash('sha1', serialize($expected_placeholder_render_array)); $expected_placeholder_markup = ''; $this->assertSame($expected_placeholder_markup, Html::normalize($expected_placeholder_markup), 'Placeholder unaltered by Html::normalize() which is used by FilterHtmlCorrector.'); @@ -440,7 +440,7 @@ $this->setUpRequest('GET'); - $token = hash('sha1', serialize($expected_placeholder_render_array)); + $token = hash('crc32', serialize($expected_placeholder_render_array)); $expected_placeholder_markup = ''; $this->assertSame($expected_placeholder_markup, Html::normalize($expected_placeholder_markup), 'Placeholder unaltered by Html::normalize() which is used by FilterHtmlCorrector.');