Issue of certificates to arbitrary domains
This commit is contained in:
Wytze van der Raay 2015-07-25 14:51:01 +00:00
parent 0fc491d308
commit edae6c8e40

View file

@ -298,8 +298,14 @@
}
}
if($cnok == 0)
if(!preg_match("/(?=^.{4,253}$)(^(?:\\*\\.)?((?!-)[a-zA-Z0-9_-]{1,63}(?<!-)\\.)+[a-zA-Z]{2,63}$)/i", $CN)) {
$cnok = 0;
}
if($cnok == 0) {
$_SESSION['_config']['rejected'][] = $CN;
continue;
}
if($_SESSION['_config']['row'] != "")
$rows[] = $CN;
@ -350,8 +356,14 @@
}
}
if($altok == 0)
if(!preg_match("/(?=^.{4,253}$)(^(?:\\*\\.)?((?!-)[a-zA-Z0-9_-]{1,63}(?<!-)\\.)+[a-zA-Z]{2,63}$)/i", $subalt)) {
$altok = 0;
}
if($altok == 0) {
$_SESSION['_config']['rejected'][] = $alt;
continue;
}
if($_SESSION['_config']['altrow'] != "")
$altrows[] = $subalt;
@ -391,6 +403,10 @@
}
}
if(!preg_match("/(?=^.{4,253}$)(^(?:\\*\\.)?((?!-)[a-zA-Z0-9_-]{1,63}(?<!-)\\.)+[a-zA-Z]{2,63}$)/i", $CN)) {
continue;
}
if($_SESSION['_config']['row'] != "")
$rows[] = $CN;
}
@ -439,6 +455,10 @@
}
}
if(!preg_match("/(?=^.{4,253}$)(^(?:\\*\\.)?((?!-)[a-zA-Z0-9_-]{1,63}(?<!-)\\.)+[a-zA-Z]{2,63}$)/i", $subalt)) {
continue;
}
if($_SESSION['_config']['altrow'] != "")
$altrows[] = $subalt;
}