mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-30 00:10:30 +00:00
nfc app: fix false positive verification in bip plugin (#3595)
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
00970a4b12
commit
be43e49869
1 changed files with 3 additions and 2 deletions
|
@ -61,7 +61,7 @@ bool bip_verify(Nfc* nfc) {
|
||||||
MfClassicError error =
|
MfClassicError error =
|
||||||
mf_classic_poller_sync_auth(nfc, block_num, &key_a_0, MfClassicKeyTypeA, &auth_ctx);
|
mf_classic_poller_sync_auth(nfc, block_num, &key_a_0, MfClassicKeyTypeA, &auth_ctx);
|
||||||
|
|
||||||
if(error == MfClassicErrorNotPresent) {
|
if(error != MfClassicErrorNone) {
|
||||||
FURI_LOG_D(TAG, "Failed to read block %u: %d", block_num, error);
|
FURI_LOG_D(TAG, "Failed to read block %u: %d", block_num, error);
|
||||||
verified = false;
|
verified = false;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,8 @@ static bool bip_read(Nfc* nfc, NfcDevice* device) {
|
||||||
do {
|
do {
|
||||||
MfClassicType type = MfClassicType1k;
|
MfClassicType type = MfClassicType1k;
|
||||||
MfClassicError error = mf_classic_poller_sync_detect_type(nfc, &type);
|
MfClassicError error = mf_classic_poller_sync_detect_type(nfc, &type);
|
||||||
if(error == MfClassicErrorNotPresent) {
|
if(error != MfClassicErrorNone) break;
|
||||||
|
if(type != MfClassicType1k) {
|
||||||
FURI_LOG_W(TAG, "Card not MIFARE Classic 1k");
|
FURI_LOG_W(TAG, "Card not MIFARE Classic 1k");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue