mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
smtp: allow empty user & pass during AUTH LOGIN (#225)
This commit is contained in:
@@ -311,21 +311,13 @@ func parseHelloArgument(arg string) (string, error) {
|
||||
}
|
||||
|
||||
func (s *Session) loginHandler(line string) {
|
||||
if len(line) == 0 {
|
||||
s.send("500 Invalid username")
|
||||
s.enterState(READY)
|
||||
return
|
||||
}
|
||||
// Content and length of username is ignored.
|
||||
s.send(fmt.Sprintf("334 %v", passwordChallenge))
|
||||
s.enterState(PASSWORD)
|
||||
}
|
||||
|
||||
func (s *Session) passwordHandler(line string) {
|
||||
if len(line) == 0 {
|
||||
s.send("500 Invalid password")
|
||||
s.enterState(READY)
|
||||
return
|
||||
}
|
||||
// Content and length of password is ignored.
|
||||
s.send("235 Authentication successful")
|
||||
s.enterState(READY)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user