From c873eb5e3692c18369e732390c280288e2eae3cc Mon Sep 17 00:00:00 2001 From: Nathan N Date: Thu, 6 Nov 2025 14:05:16 -0500 Subject: [PATCH] Fix Ultralight EV1 regression (#4287) * Fix EV1 regression introduced in e7634d7 * ./fbt format --------- Co-authored-by: hedger Co-authored-by: hedger --- .../mf_ultralight/mf_ultralight.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight.c b/applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight.c index 5ed564897..3afca397b 100644 --- a/applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight.c +++ b/applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight.c @@ -152,13 +152,16 @@ static NfcCommand if(!mf_ultralight_event->data->auth_context.skip_auth) { mf_ultralight_event->data->auth_context.password = instance->mf_ul_auth->password; - // 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; + if(data->type == MfUltralightTypeMfulC) { + // 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) {