class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
There seems to be a issue with the regex that is validating the mimetype in various locations.
The regex range [\.-\w] is supposed to be replaced with [\.\-\w] as it seems that PHP 5.5 & PCRE 8.53 no longer interpret the dash as a character but as a control sign inside the character class, throwing the following warning:
Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in php shell code on line 1
The dash should therefore be escaped in all the Regular Expressions.Reply
The regex range [\.-\w] is supposed to be replaced with [\.\-\w] as it seems that PHP 5.5 & PCRE 8.53 no longer interpret the dash as a character but as a control sign inside the character class, throwing the following warning:
Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in php shell code on line 1
The dash should therefore be escaped in all the Regular Expressions.