mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-15 16:23:43 +01:00
mediaapi/writers/download: Clarify validation applied to Origin
This commit is contained in:
parent
4dfbae81cd
commit
98ef88b668
1 changed files with 2 additions and 0 deletions
|
@ -91,6 +91,8 @@ func (r *downloadRequest) Validate() *util.JSONResponse {
|
||||||
JSON: jsonerror.NotFound(fmt.Sprintf("mediaId must be a non-empty string using only characters in %v", mediaIDCharacters)),
|
JSON: jsonerror.NotFound(fmt.Sprintf("mediaId must be a non-empty string using only characters in %v", mediaIDCharacters)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Note: the origin will be validated either by comparison to the configured server name of this homeserver
|
||||||
|
// or by a DNS SRV record lookup when creating a request for remote files
|
||||||
if r.MediaMetadata.Origin == "" {
|
if r.MediaMetadata.Origin == "" {
|
||||||
return &util.JSONResponse{
|
return &util.JSONResponse{
|
||||||
Code: 404,
|
Code: 404,
|
||||||
|
|
Loading…
Reference in a new issue