AXCWG 2 ヶ月 前
コミット
9487432632
1 ファイル変更1 行追加9 行削除
  1. 1 9
      main.js

+ 1 - 9
main.js

@@ -646,15 +646,7 @@ app.post("/avatar", async (req, res) => {
         res.set(cwh).status(500).json({code: 500, R: "IO"})
         return
     }
-    try{
-        if (["image/png", "image/webp", "image/jpeg","image/jpg",  "image/bmp"].indexOf((await detectBufferMime(Buffer.from(Object.values(req.body.avatar))))) === -1) {
-            res.set(cwh).status(500).json({code: 500, R: "ILLEGAL IMAGE"})
-            return;
-        }
-    }catch(err){
-        console.log(err)
-        return;
-    }
+
 
     db.execute("UPDATE user set avatar = ? where uuid = ?", [Buffer.from(Object.values(req.body.avatar)), req.session.uuid], (err, result) => {
         if (err) {