diff --git a/static/php/includes/settings.inc.php b/static/php/includes/settings.inc.php index 31782fb..7ab7b82 100644 --- a/static/php/includes/settings.inc.php +++ b/static/php/includes/settings.inc.php @@ -38,7 +38,7 @@ define('UGUU_FILES_ROOT', '/path/to/file/'); /* * Maximum number of iterations while generating a new filename * - * Pomf uses an algorithm to generate random filenames. Sometimes a file may + * Uguu uses an algorithm to generate random filenames. Sometimes a file may * exist under a randomly generated filename, so we count tries and keep trying. * If this value is exceeded, we give up trying to generate a new filename. * @@ -87,7 +87,7 @@ $FILTER_MODE = false; /** * Double dot file extensions. * - * Pomf keeps the last file extension for the uploaded file. In other words, an + * Uguu keeps the last file extension for the uploaded file. In other words, an * uploaded file with `.tar.gz` extension will be given a random filename which * ends in `.gz` unless configured here to ignore discards for `.tar.gz`. * diff --git a/static/php/upload.php b/static/php/upload.php index 114b937..3ec9d2e 100644 --- a/static/php/upload.php +++ b/static/php/upload.php @@ -67,7 +67,6 @@ function generateName($file) exit(0); } - //Check if EXT is blacklisted if (in_array($ext, unserialize(CONFIG_BLOCKED_EXTENSIONS))) { http_response_code(415); @@ -75,17 +74,6 @@ function generateName($file) exit(0); } - // Check blacklist DB - //$q = $db->prepare('SELECT hash, COUNT(*) AS count FROM blacklistedfiles WHERE hash = (:hash)'); - //$q->bindValue(':hash', $file->getSha1(), PDO::PARAM_STR); - //$q->execute(); - //$result = $q->fetch(); - //if ($result['count'] > 0) { - // http_response_code(415); - // throw new UploadException(UPLOAD_ERR_BLACKLISTED); - // exit(0); - //} - // Check if a file with the same name does already exist in the database $q = $db->prepare('SELECT COUNT(filename) FROM files WHERE filename = (:name)'); $q->bindValue(':name', $name, PDO::PARAM_STR);