2
0

Allow unauthenticated marshal reading to reset master key.

This commit is contained in:
Maarten Billemont
2020-01-23 16:04:53 -05:00
parent a19df80a03
commit 1b90b3deea
3 changed files with 20 additions and 14 deletions

View File

@@ -718,7 +718,9 @@ void cli_mpw(Arguments *args, Operation *operation) {
operation->user->fullName, operation->purposeResult, operation->site->siteName, operation->identicon );
// Determine master key.
MPMasterKey masterKey = operation->user->masterKeyProvider( operation->site->algorithm, operation->user->fullName );
MPMasterKey masterKey = NULL;
if (operation->user->masterKeyProvider)
masterKey = operation->user->masterKeyProvider( operation->site->algorithm, operation->user->fullName );
if (!masterKey) {
ftl( "Couldn't derive master key." );
cli_free( args, operation );