Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pam/adapter/userSelection: Do not expose user name until it has been …
…validated If an user is quick enough to type an user name on the user selection field we may end up passing such (potentially partial) value to the broker as the selected user, breaking the rest of the transaction. This happened because we returned the text input Value as is, without checking if the user ever ack'ed it via an enter press. What may happen in short is: - adapter.supportedUILayoutsReceived{} - adapter.userRequired{} * User starts typing something in the user name field - adapter.brokersListReceived{brokers:[]{...}} - adapter.UsernameOrBrokerListReceived{} * User name is set at this point as the form Value() even if not validated - adapter.brokerSelectionRequired{} - adapter.ChangeStage{Stage:1} See for example - https://github.com/3v1n0/authd/actions/runs/11390824079/job/31693266490 To prevent this, only return a valid username value after the user selection has been completed during each focus phase that the view has
- Loading branch information