summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Dörre <felix@dogcraft.de>2014-06-19 16:47:20 +0200
committerBenny Baumann <BenBE@geshi.org>2014-06-19 17:05:57 +0200
commitcc8bbdc85730bb8b65f83664385ed7986efda31e (patch)
tree4e39bee0eb0386577e2ec88a1fb2a420a5e36d4b
parent92f5ddf1858215806fff49047459ce86ca38180f (diff)
downloadcacert-devel-cc8bbdc85730bb8b65f83664385ed7986efda31e.tar.gz
cacert-devel-cc8bbdc85730bb8b65f83664385ed7986efda31e.tar.xz
cacert-devel-cc8bbdc85730bb8b65f83664385ed7986efda31e.zip
bug 1212-related: match multiple domain partsbug-1212
+ ensure that the whole domain name is matched
-rw-r--r--includes/general.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/general.php b/includes/general.php
index 123e6ec..f84ae5b 100644
--- a/includes/general.php
+++ b/includes/general.php
@@ -270,7 +270,7 @@
if(substr($name,0,2) == "*."){
$name = substr($name, 2);
}
- if(!preg_match("/[a-zA-Z0-9_]([a-zA-Z0-9\\-_]*[a-zA-Z0-9])?/",$name)){
+ if(!preg_match('/^(\\.(?!-)[a-z0-9_-]*[a-z0-9])+$/i','.'.$name)){
return false;
}
return strpos($name, "*") === false;