fixed problem with DN check

This commit is contained in:
Roland Gruber 2014-09-30 17:19:05 +00:00
parent 0e547029d8
commit 311c106690
1 changed files with 3 additions and 2 deletions

View File

@ -74,8 +74,9 @@ if (isset($_GET['DN'])) {
$DN = substr($DN, 0, -1);
}
}
$suffix = $_SESSION['config']->get_Suffix($type);
if (strpos($DN, $suffix) !== (strlen($DN) - strlen($suffix))) {
$suffix = strtolower($_SESSION['config']->get_Suffix($type));
$DNlower = strtolower($DN);
if (strpos($DNlower, $suffix) !== (strlen($DNlower) - strlen($suffix))) {
logNewMessage(LOG_ERR, 'User tried to access entry of type ' . $type . ' outside suffix ' . $suffix);
die();
}