Ver Fonte

fix: validating report host

poeti8 há 6 anos atrás
pai
commit
417150f9ea
1 ficheiros alterados com 1 adições e 0 exclusões
  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.`)
 ];