From 9c60924294374071bedc7c684c7647f9b3eb54a1 Mon Sep 17 00:00:00 2001 From: emersion Date: Mon, 29 Jan 2018 21:13:03 +0100 Subject: [PATCH] protonmail: always hash private key passphrase, fixes #25 --- protonmail/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protonmail/auth.go b/protonmail/auth.go index a4833cb..1a59bde 100644 --- a/protonmail/auth.go +++ b/protonmail/auth.go @@ -195,7 +195,7 @@ func (c *Client) AuthRefresh(expiredAuth *Auth) (*Auth, error) { func (c *Client) Unlock(auth *Auth, passphrase string) (openpgp.EntityList, error) { passphraseBytes := []byte(passphrase) - if auth.PasswordMode == PasswordSingle { + if auth.keySalt != "" { keySalt, err := base64.StdEncoding.DecodeString(auth.keySalt) if err != nil { return nil, err