strip some tags

This commit is contained in:
nokonoko 2022-01-29 21:42:49 +01:00
parent 3465b5926e
commit 32cba5812d
4 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
"allowErrors": false
},
"dest": "dist",
"pkgVersion": "1.5.1",
"pkgVersion": "1.5.2",
"banners": [
"banners/malware_scans.swig",
"banners/donations.swig"

View File

@ -1,6 +1,6 @@
{
"name": "uguu",
"version": "1.5.1",
"version": "1.5.2",
"description": "Kawaii file host",
"homepage": "https://uguu.se/",
"repository": {

View File

@ -347,7 +347,7 @@ namespace Core {
'VALUES (:hash, :orig, :name, :size, :date, :ip)'
);
$q->bindValue(':hash', Upload::$SHA1, PDO::PARAM_STR);
$q->bindValue(':orig', strip_tags(Upload::$FILE_NAME), PDO::PARAM_STR);
$q->bindValue(':orig', Upload::$FILE_NAME, PDO::PARAM_STR);
$q->bindValue(':name', Upload::$NEW_NAME_FULL, PDO::PARAM_STR);
$q->bindValue(':size', Upload::$FILE_SIZE, PDO::PARAM_INT);
$q->bindValue(':date', time(), PDO::PARAM_STR);

View File

@ -45,7 +45,7 @@ class Upload
$files = self::diverseArray($files);
foreach ($files as $file) {
self::$FILE_NAME = $file['name'];
self::$FILE_NAME = strip_tags($file['name']);
self::$FILE_SIZE = $file['size'];
self::$TEMP_FILE = $file['tmp_name'];
self::$SHA1 = sha1_file(self::$TEMP_FILE);