From eee263f2fd0329715b9b76f068672b023cd2f716 Mon Sep 17 00:00:00 2001 From: steering7253 Date: Mon, 6 Jul 2026 07:10:54 +0000 Subject: fix filename with just a / --- upload.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { -- cgit v1.3.1-10-gc9f91