File extension check is now case-insensitive
authorAlexander Ebert <ebert@woltlab.com>
Fri, 16 Mar 2012 15:34:10 +0000 (16:34 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 16 Mar 2012 15:34:10 +0000 (16:34 +0100)
Fixes #527

wcfsetup/install/files/lib/system/upload/UploadFile.class.php

index 7a0158818dadd027e27d6c9fce4dadbe03cbd75b..d3e05352d83b0e9dd02dba97b1058cfd5871abf7 100644 (file)
@@ -82,7 +82,7 @@ class UploadFile {
         */
        public function getFileExtension() {
                if (($position = StringUtil::lastIndexOf($this->getFilename(), '.')) !== false) {
-                       return StringUtil::substring($this->getFilename(), $position + 1);
+                       return StringUtil::toLowerCase(StringUtil::substring($this->getFilename(), $position + 1));
                }
                
                return '';