Skip to content

Sam/duress check pin #661

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

Merged
merged 1 commit into from
May 22, 2025
Merged

Sam/duress check pin #661

merged 1 commit into from
May 22, 2025

Conversation

samholmes
Copy link
Contributor

@samholmes samholmes commented May 20, 2025

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

#660

Description

none

Comment on lines 182 to 183
const appId =
forDuressAccount === true ? login.appId + '.duress' : login.appId
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are already in duress mode, the appId would be .duress.duress.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, actually login is always loginTree (a root). If it's not a root, then if (username == null) return false would prevent this line from being reached. Unless I misunderstand that non-roots can have a username field? If so, then it's potentially non-root, and .duress.duress is possible, but then the stash search would fail, and we'd get an exception out of this function. So generally this is safe.

You did make me think of another test case. I added it and included changes.

@samholmes samholmes force-pushed the sam/duress-checkPin branch 3 times, most recently from 0d84e48 to 4c8d796 Compare May 22, 2025 03:23
@samholmes samholmes force-pushed the sam/duress-checkPin branch from 4c8d796 to 9f60054 Compare May 22, 2025 15:36
@samholmes samholmes enabled auto-merge May 22, 2025 15:36
@samholmes samholmes merged commit 2f7ae8c into master May 22, 2025
2 checks passed
@samholmes samholmes deleted the sam/duress-checkPin branch May 22, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants