From eaafd8fd011430ba50bfa528cf8c75a7b907b835 Mon Sep 17 00:00:00 2001 From: Ulrich Block Date: Fri, 10 Jul 2015 08:01:02 +0200 Subject: [PATCH] #597 Allow top level domains longer than 4 char --- web/stuff/methods/class_validator.php | 2 +- web/stuff/methods/vorlage.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/stuff/methods/class_validator.php b/web/stuff/methods/class_validator.php index 26a4cd98..34bd9faf 100644 --- a/web/stuff/methods/class_validator.php +++ b/web/stuff/methods/class_validator.php @@ -200,7 +200,7 @@ class ValidateUserinput { $check = $this->if_obj_or_str($value, $type, $object); - if ($check and is_string($check) and preg_match("/^[\w\d+\-\.]+\.[a-z]{1,5}$/", $check)) { + if ($check and is_string($check) and preg_match("/^[\w\d+\-\.]+\.[a-z]{1,10}$/", $check)) { return $check; } else if ($check) { return $this->loop($check, 'domain', $type); diff --git a/web/stuff/methods/vorlage.php b/web/stuff/methods/vorlage.php index c90649d0..3b204a16 100644 --- a/web/stuff/methods/vorlage.php +++ b/web/stuff/methods/vorlage.php @@ -72,7 +72,7 @@ function isurl($value) { } function isdomain($value) { - return (preg_match("/^[a-z0-9\-\.]+\.[a-z]{1,5}$/", $value) !== false) ? $value : false; + return (preg_match("/^[a-z0-9\-\.]+\.[a-z]{1,10}$/", $value) !== false) ? $value : false; } function isRsync($value) {