Commit de074143 authored by Andrei Ivnitskii's avatar Andrei Ivnitskii Committed by Arthur Vakorin

issue #1221: Обновить ядро до версии 7.60 (#1222)

parent 2bb3e361
Drupal 7.60, 2018-10-18
------------------------
- Fixed security issues. See SA-CORE-2018-006.
Drupal 7.59, 2018-04-25
-----------------------
......
......@@ -8,7 +8,7 @@
/**
* The current system version.
*/
define('VERSION', '7.59');
define('VERSION', '7.60');
/**
* Core API compatibility.
......
......@@ -2311,7 +2311,10 @@ function url($path = NULL, array $options = array()) {
$language = isset($options['language']) && isset($options['language']->language) ? $options['language']->language : '';
$alias = drupal_get_path_alias($original_path, $language);
if ($alias != $original_path) {
$path = $alias;
// Strip leading slashes from internal path aliases to prevent them
// becoming external URLs without protocol. /example.com should not be
// turned into //example.com.
$path = ltrim($alias, '/');
}
}
......
......@@ -7,7 +7,7 @@ files[] = aggregator.test
configure = admin/config/services/aggregator/settings
stylesheets[all][] = aggregator.css
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
files[] = block.test
configure = admin/structure/block
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -13,7 +13,7 @@ regions[footer] = Footer
regions[highlighted] = Highlighted
regions[help] = Help
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
files[] = blog.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -7,7 +7,7 @@ files[] = book.test
configure = admin/content/book/settings
stylesheets[all][] = book.css
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
files[] = color.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -9,7 +9,7 @@ files[] = comment.test
configure = admin/content/comment
stylesheets[all][] = comment.css
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
files[] = contact.test
configure = admin/structure/contact
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
files[] = contextual.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -7,7 +7,7 @@ files[] = dashboard.test
dependencies[] = block
configure = admin/dashboard/customize
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
files[] = dblog.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -11,7 +11,7 @@ dependencies[] = field_sql_storage
required = TRUE
stylesheets[all][] = theme/field.css
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -7,7 +7,7 @@ dependencies[] = field
files[] = field_sql_storage.test
required = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -7,7 +7,7 @@ dependencies[] = field
dependencies[] = options
files[] = tests/list.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
dependencies[] = field
files[] = number.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
dependencies[] = field
files[] = options.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -7,7 +7,7 @@ dependencies[] = field
files[] = text.test
required = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ files[] = field_test.entity.inc
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
dependencies[] = field
files[] = field_ui.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
dependencies[] = field
files[] = tests/file.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -7,7 +7,7 @@ files[] = filter.test
required = TRUE
configure = admin/config/content/formats
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -9,7 +9,7 @@ files[] = forum.test
configure = admin/structure/forum
stylesheets[all][] = forum.css
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
files[] = help.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -7,7 +7,7 @@ dependencies[] = file
files[] = image.test
configure = admin/config/media/image-styles
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
files[] = image_module_test.module
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
files[] = locale.test
configure = admin/config/regional/language
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
files[] = menu.test
configure = admin/structure/menu
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -9,7 +9,7 @@ required = TRUE
configure = admin/structure/types
stylesheets[all][] = node.css
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ package = Core
core = 7.x
files[] = openid.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
dependencies[] = openid
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -4,7 +4,7 @@ package = Core
version = VERSION
core = 7.x
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
files[] = path.test
configure = admin/config/search/path
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -21,7 +21,7 @@ class PathTestCase extends DrupalWebTestCase {
parent::setUp('path');
// Create test user and login.
$web_user = $this->drupalCreateUser(array('create page content', 'edit own page content', 'administer url aliases', 'create url aliases'));
$web_user = $this->drupalCreateUser(array('create page content', 'edit own page content', 'administer url aliases', 'create url aliases', 'access content overview'));
$this->drupalLogin($web_user);
}
......@@ -160,6 +160,34 @@ class PathTestCase extends DrupalWebTestCase {
$this->drupalGet($edit['path[alias]']);
$this->assertNoText($node1->title, 'Alias was successfully deleted.');
$this->assertResponse(404);
// Create third test node.
$node3 = $this->drupalCreateNode();
// Create an invalid alias with a leading slash and verify that the slash
// is removed when the link is generated. This ensures that URL aliases
// cannot be used to inject external URLs.
// @todo The user interface should either display an error message or
// automatically trim these invalid aliases, rather than allowing them to
// be silently created, at which point the functional aspects of this
// test will need to be moved elsewhere and switch to using a
// programmatically-created alias instead.
$alias = $this->randomName(8);
$edit = array('path[alias]' => '/' . $alias);
$this->drupalPost('node/' . $node3->nid . '/edit', $edit, t('Save'));
$this->drupalGet('admin/content');
// This checks the link href before clicking it, rather than using
// DrupalWebTestCase::assertUrl() after clicking it, because the test
// browser does not always preserve the correct number of slashes in the
// URL when it visits internal links; using DrupalWebTestCase::assertUrl()
// would actually make the test pass unconditionally on the testbot (or
// anywhere else where Drupal is installed in a subdirectory).
$link_xpath = $this->xpath('//a[normalize-space(text())=:label]', array(':label' => $node3->title));
$link_href = (string) $link_xpath[0]['href'];
$link_prefix = base_path() . (variable_get('clean_url', 0) ? '' : '?q=');
$this->assertEqual($link_href, $link_prefix . $alias);
$this->clickLink($node3->title);
$this->assertResponse(404);
}
/**
......
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
files[] = php.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
files[] = poll.test
stylesheets[all][] = poll.css
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -11,7 +11,7 @@ configure = admin/config/people/profile
; See user_system_info_alter().
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
files[] = rdf.test
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
hidden = TRUE
dependencies[] = blog
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -8,7 +8,7 @@ files[] = search.test
configure = admin/config/search/settings
stylesheets[all][] = search.css
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -5,7 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-04-25
version = "7.59"
; Information added by Drupal.org packaging script on 2018-10-17
version = "7.60"
project = "drupal"
datestamp = "1524673284"
datestamp = "1539816636"
......@@ -6,7 +6,7 @@ core = 7.x
files[] = shortcut.test
configure = admin/config/user-interface/shortcut