From ddbcf228e96f0c940fac273f3f9b2ed4ff7296e4 Mon Sep 17 00:00:00 2001 From: Matthieu Barba Date: Sat, 23 Mar 2024 11:28:01 +0000 Subject: [PATCH] Check not empty --- upload_db_add.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/upload_db_add.php b/upload_db_add.php index 65dbc1d..9cb1139 100755 --- a/upload_db_add.php +++ b/upload_db_add.php @@ -31,6 +31,9 @@ if (!preg_match("/\.sqlite?$/", $name)) { $errormsg .= "
  • Wrong file type for $name (only .sqlite allowed)
  • "; $nerrors++; + } else if (filesize($tmp_name) == 0) { + $errormsg .= "
  • File is empty
  • "; + $nerrors++; } else { # Just in case, to avoid collisions $num = 1;