summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar steering72532026-07-06 07:10:54 +0000
committerGravatar steering72532026-07-06 07:11:31 +0000
commiteee263f2fd0329715b9b76f068672b023cd2f716 (patch)
tree4fbe8a51b64d610bd606458f1c4c29e2ffbc1ddb
parentupdates - mostly adding filename to urls and switch to sha512/256 (diff)
fix filename with just a / HEAD main
-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) {