Przeglądaj źródła

plugins/base: disallow replying to text/html parts

master
Simon Ser 4 lat temu
rodzic
commit
be3ab9bdd5
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: FDE7BE0E88F5E48
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      plugins/base/routes.go

+ 1
- 1
plugins/base/routes.go Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz