flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

Last line of NFC keys dictionaries may be skipped

Open LoZio opened this issue 3 years ago • 2 comments

Describe the bug.

mf_classic_dict.nfc and mf_classic_dict_user.nfc assume there is a newline at the end of the file. If newline is missing the last key is ignored. For example in current 0.63.3 there are 1242 keys in the dict, but NFC app says 1241. Last is not used. I found the problem adding 5 keys to a custom dict and seeing it only says 4 keys. Adding a blank line solved the problem.

Reproduction

  1. Add n keys to mf_classic_dict_user.nfc. Do not add a newline after the last one (save the file after entering the last digit)
  2. Upload to Flipper
  3. Open NFC app and check the number of keys. It will be n-1
  4. Add a newline to the file and upload it again
  5. Same as step 3, there will be n keys

Target

No response

Logs

No response

Anything else?

No response

LoZio avatar Aug 03 '22 10:08 LoZio

@gornekich any progress?

skotopes avatar Sep 06 '22 17:09 skotopes

Planned, will be fixed soon

gornekich avatar Sep 07 '22 14:09 gornekich

This was fixed in #1822. Please open a new issue if the problem persists.

Astrrra avatar Dec 08 '22 22:12 Astrrra