protonmail: always hash private key passphrase, fixes #25
This commit is contained in:
parent
7da6ef54da
commit
9c60924294
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue