aboutsummaryrefslogtreecommitdiff
path: root/plugins/base
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-03-18 15:08:36 +0100
committerSimon Ser <contact@emersion.fr>2020-03-18 15:08:36 +0100
commitbe3ab9bdd5fed219e31767d51150d9da14f03280 (patch)
tree7af8af7f184e198311d6d3e8104f30ff38bf1eda /plugins/base
parentae8658f468a6ee763dcf0cc90ec8f55ab0ff69cd (diff)
downloadalps-be3ab9bdd5fed219e31767d51150d9da14f03280.tar.gz
alps-be3ab9bdd5fed219e31767d51150d9da14f03280.zip
plugins/base: disallow replying to text/html parts
Diffstat (limited to 'plugins/base')
-rw-r--r--plugins/base/routes.go2
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)
}