Skip to content

Don't submit add device form through the browser if validation fails#37743

Merged
bl-nero merged 1 commit intomasterfrom
bl-nero/fix-unnamed-mfa
Feb 6, 2024
Merged

Don't submit add device form through the browser if validation fails#37743
bl-nero merged 1 commit intomasterfrom
bl-nero/fix-unnamed-mfa

Conversation

@bl-nero
Copy link
Copy Markdown
Contributor

@bl-nero bl-nero commented Feb 5, 2024

Fixes #31350

Note: I'm not adding any unit test for 2 reasons:

  1. This component will soon be replaced.
  2. It's surprisingly hard to verify that a form has not been automatically submitted. I tried mucking around HTMLFormElement.prototype, but no luck. The jsdom code goes straight to some internals that are not easily accessible.

Tested manually instead using a passkey, a MFA token, and an authenticator app.

Demo: https://www.loom.com/share/3fa1983639a341d1b36be0a03bbc678c

@github-actions github-actions Bot requested review from avatus and gzdunek February 5, 2024 10:22
@bl-nero bl-nero added no-changelog Indicates that a PR does not require a changelog entry backport/branch/v15 and removed ui size/sm labels Feb 5, 2024
@zmb3
Copy link
Copy Markdown
Collaborator

zmb3 commented Feb 5, 2024

This one can probably be backported all the way to 13.

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from gzdunek February 5, 2024 16:27
@bl-nero bl-nero added this pull request to the merge queue Feb 6, 2024
Merged via the queue into master with commit 26d657d Feb 6, 2024
@bl-nero bl-nero deleted the bl-nero/fix-unnamed-mfa branch February 6, 2024 13:05
@public-teleport-github-review-bot
Copy link
Copy Markdown

@bl-nero See the table below for backport results.

Branch Result
branch/v13 Create PR
branch/v14 Create PR
branch/v15 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New two-factor device not added through Web UI when name is not set

3 participants