mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Sanitize url to not end with implicit ports
This commit is contained in:
parent
6725d05c5f
commit
225a89c2af
5 changed files with 122 additions and 58 deletions
|
@ -1,4 +1,5 @@
|
|||
import { CONFIG } from '../../initializers'
|
||||
import { CONFIG, REMOTE_SCHEME } from '../../initializers'
|
||||
import { sanitizeHost } from '../core-utils'
|
||||
import { exists } from './misc'
|
||||
|
||||
function isWebfingerResourceValid (value: string) {
|
||||
|
@ -11,7 +12,7 @@ function isWebfingerResourceValid (value: string) {
|
|||
|
||||
const host = actorParts[1]
|
||||
|
||||
return host === CONFIG.WEBSERVER.HOSTNAME || host === CONFIG.WEBSERVER.HOST
|
||||
return sanitizeHost(host, REMOTE_SCHEME.HTTP) === CONFIG.WEBSERVER.HOSTNAME
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue