diff options
author | poeti8 <ezzati.upt@gmail.com> | 2020-02-05 17:00:43 +0300 |
---|---|---|
committer | poeti8 <ezzati.upt@gmail.com> | 2020-02-05 17:00:43 +0300 |
commit | 417150f9ea4dea6d6817291cc7341bc7ae6fcf29 (patch) | |
tree | 2b6f11ac70b2d0357f22bb0768bfccf77b93db86 /server | |
parent | 1d9e136464906ff8808e76503f01968905f8526e (diff) |
fix: validating report host
Diffstat (limited to 'server')
-rw-r--r-- | server/handlers/validators.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/server/handlers/validators.ts b/server/handlers/validators.ts index 5bc4508..322cfe5 100644 --- a/server/handlers/validators.ts +++ b/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.`) ]; |