diff --git a/core/includes/common.inc b/core/includes/common.inc index 0842201..a9bb70b 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -509,6 +509,12 @@ function drupal_http_build_query(array $query, $parent = '') { * previous request, that destination is returned. As such, a destination can * persist across multiple pages. * + * @return + * An associative array containing the key: + * - destination: The path provided via the destination query string or, if + * not available, the current path. + * + * @see current_path() * @see drupal_goto() */ function drupal_get_destination() { diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php index 97b3b25..f96d0d3 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php @@ -74,5 +74,9 @@ class NodeRSSContentTest extends NodeTestBase { $this->drupalGet("node/$node->nid"); $this->assertNoText($rss_only_content, t('Node content designed for RSS doesn\'t appear when viewing node.')); + // Check that the node feed page does not try to interpret additional path + // components as arguments for node_feed() and returns default content. + $this->drupalGet('rss.xml/' . $this->randomName() . '/' . $this->randomName()); + $this->assertText($rss_only_content, t('With an adress that doesnt make sense lets return default content.')); } } diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 349aab5..3a8905f 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -1898,6 +1898,9 @@ function node_menu() { $items['rss.xml'] = array( 'title' => 'RSS feed', 'page callback' => 'node_feed', + // Pass a FALSE and array argument to ensure that additional path components + // are not passed to node_feed(). + 'page arguments' => array(FALSE, array()), 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, );