Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Picopass save written key #126

Merged
merged 7 commits into from
Feb 17, 2024
Merged

Picopass save written key #126

merged 7 commits into from
Feb 17, 2024

Conversation

bettse
Copy link
Collaborator

@bettse bettse commented Feb 2, 2024

What's new

  • When there is no user dictionary and the key of a card is changed to something the user input, save that value to a newly created user dictionary. We believe we've seen people get into a bad state (key all 0's) when they don't know what they're doing.

Verification

  • Backup/delete user dictionary
  • Read a standard keyed iClass
  • Write key (defaults to all 0's)
  • See user dictionary with all 0's key was created
  • Try to read card again, see it was successful using all 0's key from user dictionary.

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@bettse bettse marked this pull request as ready for review February 5, 2024 00:48
picopass/helpers/iclass_elite_dict.c Show resolved Hide resolved
picopass/scenes/picopass_scene_write_key.c Outdated Show resolved Hide resolved
@skotopes
Copy link
Member

skotopes commented Feb 8, 2024

#0  0x080113a2 in __furi_crash_implementation () at furi/core/check.c:163
#1  0x08006636 in MemManage_Handler () at targets/f7/furi_hal/furi_hal_interrupt.c:283
#2  <signal handler called>
#3  iclass_elite_dict_add_key (dict=dict@entry=0x0, key=key@entry=0x2000a900 "") at /Users/aku/Work/Flipper/flipperzero-good-faps/picopass/helpers/iclass_elite_dict.c:157
#4  0x200108aa in picopass_scene_write_key_on_enter (context=0x2000a818) at /Users/aku/Work/Flipper/flipperzero-good-faps/picopass/scenes/picopass_scene_write_key.c:53
#5  0x2000f2d6 in picopass_scene_key_input_on_event (context=<optimized out>, event=...) at /Users/aku/Work/Flipper/flipperzero-good-faps/picopass/scenes/picopass_scene_key_input.c:35
#6  0x0806c848 in view_dispatcher_run (view_dispatcher=0x2000a290) at applications/services/gui/view_dispatcher.c:93
#7  0x200114bc in picopass_app (p=<optimized out>) at /Users/aku/Work/Flipper/flipperzero-good-faps/picopass/picopass.c:244
#8  0x0804be5c in flipper_application_thread (context=0x2000a460) at lib/flipper_application/flipper_application.c:224
#9  0x08013a74 in furi_thread_body (context=0x2000a740) at furi/core/thread.c:91
#10 0x08013a32 in furi_thread_catch () at furi/core/thread.c:62

Still crashing.

@skotopes
Copy link
Member

skotopes commented Feb 8, 2024

/ext/apps_data/picopass folder is empty

@bettse
Copy link
Collaborator Author

bettse commented Feb 9, 2024

I deleted the picopass folder and was able to reproduce. I thought subfolders were handled automatically, but not a big deal to add them. This should be good now, and I'll try to remember to test with no picopass for future stuff 👍

@bettse
Copy link
Collaborator Author

bettse commented Feb 15, 2024

This is ready again and I think I fixed the crash

@skotopes
Copy link
Member

skotopes commented Feb 17, 2024

Sorry for delay, I'm on vacation now and a little bit out of sync.

Key is not added to the dictionary.
Steps to reproduce:

  • With dictionary exists on the sd card
  • Write standard
  • Write elite with custom key that is not in the dictionary
  • Try to read, it fail
  • Download dictionary and check that new key is not present

@bettse
Copy link
Collaborator Author

bettse commented Feb 17, 2024 via email

@skotopes skotopes merged commit aba1d58 into flipperdevices:dev Feb 17, 2024
2 checks passed
@skotopes
Copy link
Member

make sense, merged

@bettse bettse deleted the picopass_save_written_key branch February 17, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants