From 83b80acad8431fcd56e9a331ba06c41edee48c91 Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Wed, 16 Jul 2014 16:03:02 -0400 Subject: Drupal 7.29 --- modules/simpletest/tests/bootstrap.test | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/simpletest/tests') 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 < 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'); } -- cgit v1.2.3