Skip to content

Commit

Permalink
strip some tags
Browse files Browse the repository at this point in the history
  • Loading branch information
nokonoko committed Jan 29, 2022
1 parent 3465b59 commit 32cba58
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"allowErrors": false
},
"dest": "dist",
"pkgVersion": "1.5.1",
"pkgVersion": "1.5.2",
"banners": [
"banners/malware_scans.swig",
"banners/donations.swig"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uguu",
"version": "1.5.1",
"version": "1.5.2",
"description": "Kawaii file host",
"homepage": "https://uguu.se/",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion static/php/includes/Core.namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public static function newIntoDB()
'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);
Expand Down
2 changes: 1 addition & 1 deletion static/php/includes/Upload.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function reFiles($files): array
$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);
Expand Down

0 comments on commit 32cba58

Please sign in to comment.