mirror of
https://github.com/axllent/mailpit.git
synced 2026-06-28 06:56:06 +00:00
Security: Set a default 50MB p/m limit to prevent DoS via unlimited SMTP DATA and /api/v1/send body sizes (GHSA-fpxj-m5q8-fphw)
This is a configurable limit (in MB's) which can optionally be disabled by setting it to 0.
This commit is contained in:
@@ -247,6 +247,10 @@ func listenAndServe(addr string, handler MsgIDHandler, authHandler AuthHandler)
|
||||
},
|
||||
}
|
||||
|
||||
if config.MaxMessageSize > 0 {
|
||||
srv.MaxSize = config.MaxMessageSize * 1024 * 1024
|
||||
}
|
||||
|
||||
if config.Label != "" {
|
||||
srv.AppName = fmt.Sprintf("Mailpit (%s)", config.Label)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user