1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-02-03 13:12:03 +02:00

Ensure a user has been set first before a password can be issued

This commit is contained in:
Ralph Slooten 2024-06-19 15:47:05 +12:00
parent 7773c6b04c
commit 7991c49312

View File

@ -163,6 +163,10 @@ func handleClient(conn net.Conn) {
}
case "PASS":
if state == AUTHORIZATION {
if user == "" {
sendResponse(conn, "-ERR must supply a user")
return
}
if len(args) != 1 {
sendResponse(conn, "-ERR must supply a password")
return