mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-25 03:16:44 +00:00
GODT-1609: Fix bridge password encoding
This commit is contained in:
@ -19,7 +19,7 @@ func newSMTPBackend() (*smtpBackend, error) {
|
||||
return &smtpBackend{}, nil
|
||||
}
|
||||
|
||||
func (backend *smtpBackend) Login(state *smtp.ConnectionState, username string, password string) (smtp.Session, error) {
|
||||
func (backend *smtpBackend) Login(state *smtp.ConnectionState, username, password string) (smtp.Session, error) {
|
||||
backend.usersLock.RLock()
|
||||
defer backend.usersLock.RUnlock()
|
||||
|
||||
|
||||
@ -76,7 +76,8 @@ func (bridge *Bridge) QueryUserInfo(query string) (UserInfo, error) {
|
||||
// If necessary, a TOTP and mailbox password are requested via the callbacks.
|
||||
func (bridge *Bridge) LoginUser(
|
||||
ctx context.Context,
|
||||
username string, password []byte,
|
||||
username string,
|
||||
password []byte,
|
||||
getTOTP func() (string, error),
|
||||
getKeyPass func() ([]byte, error),
|
||||
) (string, error) {
|
||||
|
||||
@ -256,6 +256,7 @@ func TestBridge_LoginDeleteRestart(t *testing.T) {
|
||||
func TestBridge_BridgePass(t *testing.T) {
|
||||
withEnv(t, func(ctx context.Context, s *server.Server, dialer *bridge.TestDialer, locator bridge.Locator, storeKey []byte) {
|
||||
var userID string
|
||||
|
||||
var pass []byte
|
||||
|
||||
withBridge(t, ctx, s.GetHostURL(), dialer, locator, storeKey, func(bridge *bridge.Bridge, mocks *bridge.Mocks) {
|
||||
|
||||
Reference in New Issue
Block a user