Browse Source

plugins/base: disallow replying to text/html parts

master
Simon Ser 4 years ago
parent
commit
be3ab9bdd5
No known key found for this signature in database GPG Key ID: FDE7BE0E88F5E48
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      plugins/base/routes.go

+ 1
- 1
plugins/base/routes.go View File

@@ -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…
Cancel
Save