summaryrefslogtreecommitdiff
path: root/modules/node
diff options
context:
space:
mode:
Diffstat (limited to 'modules/node')
-rw-r--r--modules/node/node.module3
-rw-r--r--modules/node/node.test6
2 files changed, 8 insertions, 1 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 65a4224cf..d3d1c85b1 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1984,6 +1984,9 @@ function node_menu() {
'page callback' => 'node_feed',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
+ // Pass a FALSE and array argument to ensure that additional path components
+ // are not passed to node_feed().
+ 'page arguments' => array(FALSE, array()),
);
// @todo Remove this loop when we have a 'description callback' property.
// Reset internal static cache of _node_types_build(), forces to rebuild the
diff --git a/modules/node/node.test b/modules/node/node.test
index 7080ce7ab..dc21daf6b 100644
--- a/modules/node/node.test
+++ b/modules/node/node.test
@@ -832,7 +832,11 @@ class NodeRSSContentTestCase extends DrupalWebTestCase {
// viewing node.
$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('Ignore page arguments when delivering rss.xml.'));
}
}