Skip to content

Sam/rest o duress #659

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 2 commits into from
May 22, 2025
Merged

Sam/rest o duress #659

merged 2 commits 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

none

Description

none

@swansontec swansontec mentioned this pull request May 21, 2025
2 tasks
This bug is where login with password from the login server does not
persist duress mode for the account, but persists it for other accounts
when attempting to login using a key.

The expected behavior is that login with password or key while in duress
mode should always bring you to the duress mode account/stash regardless
of whether login was online or offline. This is because online and
offline should always behave the same.
@samholmes samholmes force-pushed the sam/rest-o-duress branch 2 times, most recently from 413dcab to e89b64b Compare May 22, 2025 02:53
@@ -61,6 +61,7 @@ export interface LoginStash {
// PIN v2 login:
pin2Key?: Uint8Array
pin2TextBox?: EdgeBox
pinEnabledLie?: boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

Not needed anymore, right?

* Returns a copy of the PIN login key if one exists on the local device and
* the app id matches the duress appId.
*/
export function findPin2StashDuress(
Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect! This function makes sense.

Completely fake enable and disable pin settings stash by looking at the
duress stash within `localUser` reducer and respecting PinDisabledError
that is thrown in `loginWithPIN`.
@samholmes samholmes force-pushed the sam/rest-o-duress branch from e89b64b to 97e6195 Compare May 22, 2025 03:10
@samholmes samholmes enabled auto-merge May 22, 2025 03:11
@samholmes samholmes merged commit d85fdca into master May 22, 2025
2 checks passed
@samholmes samholmes deleted the sam/rest-o-duress branch May 22, 2025 03:13
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