Update Go dependencies (#36781)
Update all non-locked Go dependencies and pin incompatible ones. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -41,19 +41,17 @@ func (a *loginAuth) Next(fromServer []byte, more bool) ([]byte, error) {
|
||||
}
|
||||
|
||||
type ntlmAuth struct {
|
||||
username, password, domain string
|
||||
domainNeeded bool
|
||||
username, password string
|
||||
}
|
||||
|
||||
// NtlmAuth SMTP AUTH NTLM Auth Handler
|
||||
func NtlmAuth(username, password string) smtp.Auth {
|
||||
user, domain, domainNeeded := ntlmssp.GetDomain(username)
|
||||
return &ntlmAuth{user, password, domain, domainNeeded}
|
||||
return &ntlmAuth{username, password}
|
||||
}
|
||||
|
||||
// Start starts SMTP NTLM Auth
|
||||
func (a *ntlmAuth) Start(server *smtp.ServerInfo) (string, []byte, error) {
|
||||
negotiateMessage, err := ntlmssp.NewNegotiateMessage(a.domain, "")
|
||||
negotiateMessage, err := ntlmssp.NewNegotiateMessage("", "")
|
||||
return "NTLM", negotiateMessage, err
|
||||
}
|
||||
|
||||
@@ -63,7 +61,7 @@ func (a *ntlmAuth) Next(fromServer []byte, more bool) ([]byte, error) {
|
||||
if len(fromServer) == 0 {
|
||||
return nil, errors.New("ntlm ChallengeMessage is empty")
|
||||
}
|
||||
authenticateMessage, err := ntlmssp.ProcessChallenge(fromServer, a.username, a.password, a.domainNeeded)
|
||||
authenticateMessage, err := ntlmssp.NewAuthenticateMessage(fromServer, a.username, a.password, nil)
|
||||
return authenticateMessage, err
|
||||
}
|
||||
return nil, nil
|
||||
|
||||
Reference in New Issue
Block a user