summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2014-07-16 16:08:05 -0400
committerDavid Rothstein <drothstein@gmail.com>2014-07-16 16:08:05 -0400
commit3310afeb856564d2bc0c03512566bff60029d7be (patch)
tree3daebf4b2b5965c66e93180d31338439a6a76625 /modules/simpletest
parent338e2d4db78cc346a7491b54537b4120f53a8da2 (diff)
parent83b80acad8431fcd56e9a331ba06c41edee48c91 (diff)
downloadbrdo-3310afeb856564d2bc0c03512566bff60029d7be.tar.gz
brdo-3310afeb856564d2bc0c03512566bff60029d7be.tar.bz2
Merge tag '7.29' into 7.x
7.29 release Conflicts: includes/bootstrap.inc
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');
}