Skip to content

Commit fe52de2

Browse files
committed
Fix EV1 regression introduced in e7634d7
1 parent 85b6b2b commit fe52de2

File tree

1 file changed

+9
-7
lines changed
  • applications/main/nfc/helpers/protocol_support/mf_ultralight

1 file changed

+9
-7
lines changed

applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,15 @@ static NfcCommand
152152
if(!mf_ultralight_event->data->auth_context.skip_auth) {
153153
mf_ultralight_event->data->auth_context.password = instance->mf_ul_auth->password;
154154

155-
// Only set tdes_key for Manual/Reader auth types, not for dictionary attacks
156-
if(instance->mf_ul_auth->type == MfUltralightAuthTypeManual ||
157-
instance->mf_ul_auth->type == MfUltralightAuthTypeReader) {
158-
mf_ultralight_event->data->key_request_data.key = instance->mf_ul_auth->tdes_key;
159-
mf_ultralight_event->data->key_request_data.key_provided = true;
160-
} else {
161-
mf_ultralight_event->data->key_request_data.key_provided = false;
155+
if(data->type == MfUltralightTypeMfulC) {
156+
// Only set tdes_key for Manual/Reader auth types, not for dictionary attacks
157+
if(instance->mf_ul_auth->type == MfUltralightAuthTypeManual ||
158+
instance->mf_ul_auth->type == MfUltralightAuthTypeReader) {
159+
mf_ultralight_event->data->key_request_data.key = instance->mf_ul_auth->tdes_key;
160+
mf_ultralight_event->data->key_request_data.key_provided = true;
161+
} else {
162+
mf_ultralight_event->data->key_request_data.key_provided = false;
163+
}
162164
}
163165
}
164166
} else if(mf_ultralight_event->type == MfUltralightPollerEventTypeAuthSuccess) {

0 commit comments

Comments
 (0)