- diff --git a/includes/common.php b/includes/common.php
- index 4d58f60aa..d98423368 100644
- --- a/includes/common.php
- +++ b/includes/common.php
- @@ -649,7 +649,7 @@ function is_valid_hostname($hostname)
- // maximum length is 253 characters, maximum segment size is 63
- return (
- - preg_match("/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*\.?$/i", $hostname) //valid chars check
- + preg_match("/^([a-z\d](-*[a-z\d_])*)(\.([a-z\d](-*[a-z\d])*))*\.?$/i", $hostname) //valid chars check
- && preg_match("/^.{1,253}$/", $hostname) //overall length check
- && preg_match("/^[^\.]{1,63}(\.[^\.]{1,63})*\.?$/", $hostname)
- );