summaryrefslogtreecommitdiff
path: root/upload.php
diff options
context:
space:
mode:
Diffstat (limited to 'upload.php')
-rw-r--r--upload.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/upload.php b/upload.php
index e82af6d..5f609d4 100644
--- a/upload.php
+++ b/upload.php
@@ -101,13 +101,16 @@ function die_error($s) {
function unsafe_get_extension($file) {
- if ($file === '') {
+ if ($file == '') {
return '/file';
}
$ext = strrchr($file, '/');
if (FALSE === $ext) {
return '/'.$file;
}
+ if ($ext == '/') {
+ return '/file';
+ }
return $ext;
}
function get_extension($file) {