summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2014-08-06 13:15:28 -0400
committerDavid Rothstein <drothstein@gmail.com>2014-08-06 13:15:28 -0400
commitb6d84a81aa5ab264076cfccc789915fe98113798 (patch)
tree07887ed7ddbaff3ad44f1fee8e0e7d8df173496b /modules
parent7ca0dfe310ed4f7e5cfc86eb554245b0434ed704 (diff)
parent90e884ad0f7f2cf269d953f7d70966de9fd821ff (diff)
downloadbrdo-b6d84a81aa5ab264076cfccc789915fe98113798.tar.gz
brdo-b6d84a81aa5ab264076cfccc789915fe98113798.tar.bz2
Merge tag '7.31' into 7.x
7.31 release Conflicts: CHANGELOG.txt includes/bootstrap.inc
Diffstat (limited to 'modules')
-rw-r--r--modules/openid/openid.inc5
-rw-r--r--modules/simpletest/tests/xmlrpc.test5
2 files changed, 10 insertions, 0 deletions
diff --git a/modules/openid/openid.inc b/modules/openid/openid.inc
index d7ef663b4..a1da1d0b5 100644
--- a/modules/openid/openid.inc
+++ b/modules/openid/openid.inc
@@ -158,6 +158,11 @@ function _openid_xrds_parse($raw_xml) {
return array();
}
+ // Also stop parsing if there is an unreasonably large number of tags.
+ if ($dom->getElementsByTagName('*')->length > variable_get('openid_xrds_maximum_tag_count', 30000)) {
+ return array();
+ }
+
// Parse the DOM document for the information we need.
if ($xml = simplexml_import_dom($dom)) {
foreach ($xml->children(OPENID_NS_XRD)->XRD as $xrd) {
diff --git a/modules/simpletest/tests/xmlrpc.test b/modules/simpletest/tests/xmlrpc.test
index 1a0fd86db..1a9ef2349 100644
--- a/modules/simpletest/tests/xmlrpc.test
+++ b/modules/simpletest/tests/xmlrpc.test
@@ -211,6 +211,11 @@ class XMLRPCMessagesTestCase extends DrupalWebTestCase {
* Make sure that XML-RPC can transfer large messages.
*/
function testSizedMessages() {
+ // These tests can produce up to 128 x 160 words in the XML-RPC message
+ // (see xmlrpc_test_message_sized_in_kb()) with 4 tags used to represent
+ // each. Set a large enough tag limit to allow this to be tested.
+ variable_set('xmlrpc_message_maximum_tag_count', 100000);
+
$xml_url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
$sizes = array(8, 80, 160);
foreach ($sizes as $size) {