protonmail: always hash private key passphrase, fixes #25

This commit is contained in:
emersion 2018-01-29 21:13:03 +01:00
parent 7da6ef54da
commit 9c60924294
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ func (c *Client) AuthRefresh(expiredAuth *Auth) (*Auth, error) {
func (c *Client) Unlock(auth *Auth, passphrase string) (openpgp.EntityList, error) { func (c *Client) Unlock(auth *Auth, passphrase string) (openpgp.EntityList, error) {
passphraseBytes := []byte(passphrase) passphraseBytes := []byte(passphrase)
if auth.PasswordMode == PasswordSingle { if auth.keySalt != "" {
keySalt, err := base64.StdEncoding.DecodeString(auth.keySalt) keySalt, err := base64.StdEncoding.DecodeString(auth.keySalt)
if err != nil { if err != nil {
return nil, err return nil, err