fixed extension check (bug 162)

This commit is contained in:
Roland Gruber 2014-01-18 17:25:08 +00:00
parent 846ebe2f80
commit 914cd0d13d
1 changed files with 1 additions and 1 deletions

View File

@ -1729,7 +1729,7 @@ class inetOrgPerson extends baseModule implements passwordService {
if ($_FILES['photoFile'] && ($_FILES['photoFile']['size'] > 0)) {
$name = $_FILES['photoFile']['name'];
$extension = strtolower(substr($name, strpos($name, '.') + 1));
if (!extension_loaded('imagick') && !($extension == '.jpg') && !($extension == '.jpeg')) {
if (!extension_loaded('imagick') && !($extension == 'jpg') && !($extension == 'jpeg')) {
$messages[] = $this->messages['file'][1];
return $messages;
}