diff options
author | Simon Ser <contact@emersion.fr> | 2020-03-18 15:08:36 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-03-18 15:08:36 +0100 |
commit | be3ab9bdd5fed219e31767d51150d9da14f03280 (patch) | |
tree | 7af8af7f184e198311d6d3e8104f30ff38bf1eda | |
parent | ae8658f468a6ee763dcf0cc90ec8f55ab0ff69cd (diff) | |
download | alps-be3ab9bdd5fed219e31767d51150d9da14f03280.tar.gz alps-be3ab9bdd5fed219e31767d51150d9da14f03280.zip |
plugins/base: disallow replying to text/html parts
-rw-r--r-- | plugins/base/routes.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/base/routes.go b/plugins/base/routes.go index 85034de..c24d3bb 100644 --- a/plugins/base/routes.go +++ b/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) } |