Update to Drupal 8.0.0-rc3. For more information, see https://www.drupal.org/node/2608078

This commit is contained in:
Pantheon Automation 2015-11-04 11:11:27 -08:00 committed by Greg Anderson
parent 6419a031d7
commit 4afb23bbd3
762 changed files with 20080 additions and 6368 deletions

View file

@ -7,6 +7,7 @@
namespace Drupal\toolbar\Controller;
use Drupal\Component\Utility\Crypt;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Controller\ControllerBase;
@ -52,7 +53,8 @@ class ToolbarController extends ControllerBase {
* The access result.
*/
public function checkSubTreeAccess($hash) {
return AccessResult::allowedIf($this->currentUser()->hasPermission('access toolbar') && $hash == _toolbar_get_subtrees_hash()[0])->cachePerPermissions();
$expected_hash = _toolbar_get_subtrees_hash()[0];
return AccessResult::allowedIf($this->currentUser()->hasPermission('access toolbar') && Crypt::hashEquals($expected_hash, $hash))->cachePerPermissions();
}
}

View file

@ -97,9 +97,6 @@ class Toolbar extends RenderElement {
$element[$key]['#id'] = Html::getId('toolbar-item-' . $key);
}
// Render the children.
$element['#children'] = drupal_render_children($element);
return $element;
}

View file

@ -215,7 +215,6 @@ class ToolbarAdminMenuTest extends WebTestBase {
*/
function testNonCurrentUserAccountUpdates() {
$admin_user_id = $this->adminUser->id();
$admin_user_2_id = $this->adminUser2->id();
$this->hash = $this->getSubtreesHash();
// adminUser2 will add a role to adminUser.
@ -258,12 +257,8 @@ class ToolbarAdminMenuTest extends WebTestBase {
$langcode = 'xx';
// The English name for the language. This will be translated.
$name = $this->randomMachineName(16);
// This is the language indicator on the translation search screen for
// untranslated strings.
$language_indicator = "<em class=\"locale-untranslated\">$langcode</em> ";
// This will be the translation of $name.
$translation = $this->randomMachineName(16);
$translation_to_en = $this->randomMachineName(16);
// Add custom language.
$this->drupalLogin($admin_user);