Parcourir la source

fix: validating report host

poeti8 il y a 6 ans
Parent
commit
417150f9ea
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  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.`)
 ];