Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

264
Visualizações
Express js Sanitize does not work (Express-validate)

I want to sanitize my user inputs, so that no xss is possible. I know that this works in PHP which is why it has to somehow work in node js aswell. I want to remove htmlchars, stripslashes and trim the userinput, but it somehow does not work.

I've tried express-validate, but with no effect at all. I've also tried express-sanitizer, which also did not work. And the I also tried a module called xss which didn't work aswell.

Can anyone help?

routing js:

router.post('/register', function(req, res, next) {
  let regemail = req.body.EMailRegister,
      reguser = req.body.UsernameRegister,
      regpass = req.body.PasswordRegister,
      regpassre = req.body.RepeatPasswordRegister;

I want to sanitize those variables, but it won't work.

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda