Remove trailing slashes from appservice url (#546)

* Remove trailing slashes from appservice url

* Use TrimRight instead
main
Andrew Morgan 2018-07-16 08:16:01 -07:00 committed by GitHub
parent 49b63089f5
commit 3ac23f9063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -236,6 +236,9 @@ func checkErrors(config *Dendrite) (err error) {
}
}
// Check if the url has trailing /'s. If so, remove them
appservice.URL = strings.TrimRight(appservice.URL, "/")
// Check if we've already seen this ID. No two application services
// can have the same ID or token.
if idMap[appservice.ID] {