mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-22 05:14:46 -07:00
Fix uninitialized key attempt
This commit is contained in:
@@ -151,8 +151,15 @@ static NfcCommand
|
||||
}
|
||||
if(!mf_ultralight_event->data->auth_context.skip_auth) {
|
||||
mf_ultralight_event->data->auth_context.password = instance->mf_ul_auth->password;
|
||||
mf_ultralight_event->data->key_request_data.key = instance->mf_ul_auth->tdes_key;
|
||||
// TODO: Key provided attribute is not set
|
||||
|
||||
// Only set tdes_key for Manual/Reader auth types, not for dictionary attacks
|
||||
if(instance->mf_ul_auth->type == MfUltralightAuthTypeManual ||
|
||||
instance->mf_ul_auth->type == MfUltralightAuthTypeReader) {
|
||||
mf_ultralight_event->data->key_request_data.key = instance->mf_ul_auth->tdes_key;
|
||||
mf_ultralight_event->data->key_request_data.key_provided = true;
|
||||
} else {
|
||||
mf_ultralight_event->data->key_request_data.key_provided = false;
|
||||
}
|
||||
}
|
||||
} else if(mf_ultralight_event->type == MfUltralightPollerEventTypeAuthSuccess) {
|
||||
instance->mf_ul_auth->pack = mf_ultralight_event->data->auth_context.pack;
|
||||
|
||||
Reference in New Issue
Block a user