提交 98ef88b6 编写于 作者: R Robert Swain

mediaapi/writers/download: Clarify validation applied to Origin

上级 4dfbae81
......@@ -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)),
}
}
// 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 == "" {
return &util.JSONResponse{
Code: 404,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册