summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2014-07-16 16:03:02 -0400
committerDavid Rothstein <drothstein@gmail.com>2014-07-16 16:03:02 -0400
commit83b80acad8431fcd56e9a331ba06c41edee48c91 (patch)
tree14e68546a7d96f64ea9e34196f10404eea093922 /modules/simpletest
parent1769d1cca92e206510528c324552797e83a1fc7c (diff)
downloadbrdo-83b80acad8431fcd56e9a331ba06c41edee48c91.tar.gz
brdo-83b80acad8431fcd56e9a331ba06c41edee48c91.tar.bz2
Drupal 7.29
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/tests/bootstrap.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/simpletest/tests/bootstrap.test b/modules/simpletest/tests/bootstrap.test
index 4fda15c8c..5dcde3258 100644
--- a/modules/simpletest/tests/bootstrap.test
+++ b/modules/simpletest/tests/bootstrap.test
@@ -93,6 +93,11 @@ class BootstrapIPAddressTestCase extends DrupalWebTestCase {
$this->assertFalse(drupal_valid_http_host('security\\.drupal.org:80'), 'HTTP_HOST with \\ is invalid');
$this->assertFalse(drupal_valid_http_host('security<.drupal.org:80'), 'HTTP_HOST with &lt; is invalid');
$this->assertFalse(drupal_valid_http_host('security..drupal.org:80'), 'HTTP_HOST with .. is invalid');
+ // Verifies that host names are shorter than 1000 characters.
+ $this->assertFalse(drupal_valid_http_host(str_repeat('x', 1001)), 'HTTP_HOST with more than 1000 characters is invalid.');
+ $this->assertFalse(drupal_valid_http_host(str_repeat('.', 101)), 'HTTP_HOST with more than 100 subdomains is invalid.');
+ $this->assertFalse(drupal_valid_http_host(str_repeat(':', 101)), 'HTTP_HOST with more than 100 portseparators is invalid.');
+
// IPv6 loopback address
$this->assertTrue(drupal_valid_http_host('[::1]:80'), 'HTTP_HOST containing IPv6 loopback is valid');
}