mirror of
https://github.com/neilalexander/yggmail.git
synced 2026-05-08 04:46:28 +03:00
Validation fixes
This commit is contained in:
@@ -63,11 +63,12 @@ func (b *Backend) AnonymousLogin(state *smtp.ConnectionState) (smtp.Session, err
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("hex.DecodeString: %w", err)
|
||||
}
|
||||
if state.Hostname != base62.EncodeToString(pks) {
|
||||
remote := base62.EncodeToString(pks)
|
||||
if state.Hostname != remote {
|
||||
return nil, fmt.Errorf("You are not who you claim to be")
|
||||
}
|
||||
|
||||
b.Log.Println("Incoming SMTP session from", state.RemoteAddr.String())
|
||||
b.Log.Println("Incoming SMTP session from", remote)
|
||||
return &SessionRemote{
|
||||
backend: b,
|
||||
state: state,
|
||||
|
||||
Reference in New Issue
Block a user