aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/webfinger.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators/webfinger.ts')
-rw-r--r--server/helpers/custom-validators/webfinger.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/webfinger.ts b/server/helpers/custom-validators/webfinger.ts
index 1b9aad444..46f1ac210 100644
--- a/server/helpers/custom-validators/webfinger.ts
+++ b/server/helpers/custom-validators/webfinger.ts
@@ -1,4 +1,5 @@
1import { CONFIG } from '../../initializers' 1import { CONFIG, REMOTE_SCHEME } from '../../initializers'
2import { sanitizeHost } from '../core-utils'
2import { exists } from './misc' 3import { exists } from './misc'
3 4
4function isWebfingerResourceValid (value: string) { 5function isWebfingerResourceValid (value: string) {
@@ -11,7 +12,7 @@ function isWebfingerResourceValid (value: string) {
11 12
12 const host = actorParts[1] 13 const host = actorParts[1]
13 14
14 return host === CONFIG.WEBSERVER.HOSTNAME || host === CONFIG.WEBSERVER.HOST 15 return sanitizeHost(host, REMOTE_SCHEME.HTTP) === CONFIG.WEBSERVER.HOSTNAME
15} 16}
16 17
17// --------------------------------------------------------------------------- 18// ---------------------------------------------------------------------------