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:
silverwind
2026-04-01 05:26:52 +02:00
committed by GitHub
parent 35b654c9d6
commit a20e182067
20 changed files with 495 additions and 603 deletions

View File

@@ -21,7 +21,7 @@ import (
"github.com/dimiro1/reply"
"github.com/emersion/go-imap"
"github.com/emersion/go-imap/client"
"github.com/jhillyerd/enmime"
"github.com/jhillyerd/enmime/v2"
)
var (

View File

@@ -7,7 +7,7 @@ import (
"strings"
"testing"
"github.com/jhillyerd/enmime"
"github.com/jhillyerd/enmime/v2"
"github.com/stretchr/testify/assert"
)

View File

@@ -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