2
0

Abort CLI if master password doesn't match.

This commit is contained in:
Maarten Billemont
2017-08-03 01:13:15 -04:00
parent 434d70ebff
commit 096919637f
2 changed files with 20 additions and 15 deletions

View File

@@ -410,7 +410,7 @@ static MPMarshalledUser *mpw_marshall_read_flat(
return NULL;
}
if (keyID && !mpw_id_buf_equals( keyID, mpw_id_buf( masterKey, MPMasterKeySize ) )) {
*error = (MPMarshallError){ MPMarshallErrorMasterPassword, "Incorrect master password for import file." };
*error = (MPMarshallError){ MPMarshallErrorMasterPassword, "Master password doesn't match key ID." };
return NULL;
}
if (!(user = mpw_marshall_user( fullName, masterPassword, algorithm ))) {
@@ -586,7 +586,7 @@ static MPMarshalledUser *mpw_marshall_read_json(
return NULL;
}
if (keyID && !mpw_id_buf_equals( keyID, mpw_id_buf( masterKey, MPMasterKeySize ) )) {
*error = (MPMarshallError){ MPMarshallErrorMasterPassword, "Incorrect master password for import file." };
*error = (MPMarshallError){ MPMarshallErrorMasterPassword, "Master password doesn't match key ID." };
return NULL;
}
if (!(user = mpw_marshall_user( fullName, masterPassword, algorithm ))) {