瀏覽代碼

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)
}


Loading…
取消
儲存