rrg92 commited on
Commit
edba4e9
·
1 Parent(s): 9f39a3f

melhoria na validacao

Browse files
Files changed (1) hide show
  1. server.js +7 -0
server.js CHANGED
@@ -320,6 +320,13 @@ app.get('/error', async (req, res) => {
320
  return;
321
  }
322
 
 
 
 
 
 
 
 
323
  if(tentativas)
324
  tentativas = tentativas.split(",").map(Number).join(",");
325
 
 
320
  return;
321
  }
322
 
323
+ let error = req.query.error;
324
+
325
+ if(/^[^0-9]+$/g.test(error)){
326
+ res.json({error:"Tentando atacar né?"})
327
+ return;
328
+ }
329
+
330
  if(tentativas)
331
  tentativas = tentativas.split(",").map(Number).join(",");
332