Explorar el Código

plugins/base: disallow replying to text/html parts

master
Simon Ser hace 4 años
padre
commit
be3ab9bdd5
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: FDE7BE0E88F5E48
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      plugins/base/routes.go

+ 1
- 1
plugins/base/routes.go Ver fichero

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


Cargando…
Cancelar
Guardar