浏览代码

plugins/base: disallow replying to text/html parts

master
Simon Ser 4 年前
父节点
当前提交
be3ab9bdd5
找不到此签名对应的密钥 GPG 密钥 ID: FDE7BE0E88F5E48
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      plugins/base/routes.go

+ 1
- 1
plugins/base/routes.go 查看文件

@@ -494,7 +494,7 @@ func handleReply(ctx *koushin.Context) error {
return fmt.Errorf("failed to parse part Content-Type: %v", err)
}

if !strings.HasPrefix(strings.ToLower(mimeType), "text/") {
if !strings.EqualFold(mimeType, "text/plain") {
err := fmt.Errorf("cannot reply to %q part", mimeType)
return echo.NewHTTPError(http.StatusBadRequest, err)
}


正在加载...
取消
保存