Smash multiple extensions down into a single one when accepting file

uploads.  Fixes #1872.
This commit is contained in:
Bharat Mediratta
2012-05-17 20:25:27 -07:00
parent 931da5f2ff
commit 9e2ea2ffed
6 changed files with 42 additions and 2 deletions

View File

@@ -490,7 +490,8 @@ class Item_Model_Test extends Gallery_Unit_Test_Case {
}
public function illegal_extension_test() {
foreach (array("test.php", "test.PHP", "test.php5", "test.php4", "test.pl") as $name) {
foreach (array("test.php", "test.PHP", "test.php5", "test.php4",
"test.pl", "test.php.png") as $name) {
try {
$photo = test::random_photo_unsaved(item::root());
$photo->name = $name;