summaryrefslogtreecommitdiff
path: root/includes/general.php
diff options
context:
space:
mode:
authorFelix Dörre <felix@dogcraft.de>2014-06-19 15:49:02 +0200
committerFelix Dörre <felix@dogcraft.de>2014-06-19 15:49:02 +0200
commit92f5ddf1858215806fff49047459ce86ca38180f (patch)
treee6990ac86c03e5f6f81dedc6705ca1c608f8b5f9 /includes/general.php
parentd7506849135861d0fab472799d1019c8d3794bb4 (diff)
downloadcacert-devel-92f5ddf1858215806fff49047459ce86ca38180f.tar.gz
cacert-devel-92f5ddf1858215806fff49047459ce86ca38180f.tar.xz
cacert-devel-92f5ddf1858215806fff49047459ce86ca38180f.zip
bug 1212-related: ensure that domain names contain only valid symbols
as letters, numbers hyphen and underscore
Diffstat (limited to 'includes/general.php')
-rw-r--r--includes/general.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/general.php b/includes/general.php
index 621e1cc..123e6ec 100644
--- a/includes/general.php
+++ b/includes/general.php
@@ -270,6 +270,9 @@
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)){
+ return false;
+ }
return strpos($name, "*") === false;
}