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

Jailbreak detection blocking main thread #214

Open
simonmcl opened this issue Jun 15, 2020 · 1 comment
Open

Jailbreak detection blocking main thread #214

simonmcl opened this issue Jun 15, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@simonmcl
Copy link
Collaborator

Looks like Jailbreak detection was added to the library and will cause it to crash if on a jailbroken phone. This is unexpected, hidden and not documented.

  1. This is now blocking the main thread for ~2 seconds every-time the wallet object is created. Our security audit instructed us to not keep this object in memory, meaning we have to re-create it for every transaction or network query. This is now adding a long delay and necessitating re-writes to complicated logic.

  2. While I agree jailbreaking poses risks. I'm not sure I agree that TezosKit should be making a decision as to whether the app can run on a jailbroken phone or not. We were considering showing a message in our app. Either informing the user that they are not allowed to continue, or telling them the risks before continuing. But now the app crashes, without warning or instructions to the user.

I think it would be better to do one of the following:

  • Break this out as a separate function that apps can chose when/where/if to call themselves
  • Make it configurable
  • Run it on the Background thread to not forcibly block the main thread, and throw an error rather than crash
@simonmcl simonmcl added the bug Something isn't working label Jun 15, 2020
@simonmcl
Copy link
Collaborator Author

Seems the jailbreak detection isn't blocking the main thread. I assumed it was, as it was the only change I noticed. Either the SecretKey or PublicKey creation in the Wallet is now blocking the main thread. Maybe consider making it Async

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants