Explorar el Código

fix: validating report host

poeti8 hace 6 años
padre
commit
417150f9ea
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      server/handlers/validators.ts

+ 1 - 0
server/handlers/validators.ts

@@ -164,6 +164,7 @@ export const reportLink = [
       checkFalsy: true,
       checkNull: true
     })
+    .customSanitizer(addProtocol)
     .custom(value => URL.parse(value).hostname === env.DEFAULT_DOMAIN)
     .withMessage(`You can only report a ${env.DEFAULT_DOMAIN} link.`)
 ];