summaryrefslogtreecommitdiff
path: root/modules/openid
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2014-08-06 13:14:03 -0400
committerDavid Rothstein <drothstein@gmail.com>2014-08-06 13:14:03 -0400
commit90e884ad0f7f2cf269d953f7d70966de9fd821ff (patch)
tree92c73436cab67dfbd92b2a2640a0916e933083a7 /modules/openid
parentf9784cf829fe2d6aad57b6de1f2e3a167e95cea6 (diff)
downloadbrdo-90e884ad0f7f2cf269d953f7d70966de9fd821ff.tar.gz
brdo-90e884ad0f7f2cf269d953f7d70966de9fd821ff.tar.bz2
Drupal 7.31
Diffstat (limited to 'modules/openid')
-rw-r--r--modules/openid/openid.inc5
1 files changed, 5 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) {