Explorar o código

Decrease target limit to 1023

poeti8 %!s(int64=6) %!d(string=hai) anos
pai
achega
1f50d1053e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      server/controllers/validateBodyController.ts

+ 2 - 2
server/controllers/validateBodyController.ts

@@ -72,8 +72,8 @@ export const validateUrl: RequestHandler = async (req, res, next) => {
     return res.status(400).json({ error: "No target has been provided." });
 
   // validate URL length
-  if (req.body.target.length > 3000) {
-    return res.status(400).json({ error: "Maximum URL length is 3000." });
+  if (req.body.target.length > 1023) {
+    return res.status(400).json({ error: "Maximum URL length is 1023." });
   }
 
   // Validate URL