From d77f6e17d88ec4880b6a46767cadc66ab3dd689f Mon Sep 17 00:00:00 2001 From: Denis Fateyev Date: Mon, 14 Oct 2013 03:59:32 +0600 Subject: [PATCH] phpki: domain wildcard fix --- include/my_functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/my_functions.php b/include/my_functions.php index 1c53202..9511379 100644 --- a/include/my_functions.php +++ b/include/my_functions.php @@ -205,6 +205,8 @@ function is_ip( $ip = null ) { # Returns True if the given string is a valid FQDN # function is_fqdn($FQDN) { + // remove leading wildcard characters if exist + $FQDN = preg_replace('/^\*\./','', $FQDN, 1); return (!empty($FQDN) && preg_match('/(?=^.{1,254}$)(^(?:(?!\d|-)[a-z0-9\-]{1,63}(? 0); }