Skip to content

Commit

Permalink
ui: mfa: use proper request id generation (#17835)
Browse files Browse the repository at this point in the history
* ui: mfa: use proper request id generation

Fixes: 712cc9e, ca14c19

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
  • Loading branch information
rockdrilla committed Nov 29, 2022
1 parent 5a9786f commit dfdb14b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 3 additions & 0 deletions changelog/17835.txt
@@ -0,0 +1,3 @@
```release-note:improvement
ui: mfa: use proper request id generation
```
6 changes: 1 addition & 5 deletions ui/mirage/handlers/mfa-login.js
Expand Up @@ -93,11 +93,7 @@ export default function (server) {
} else if (user === 'mfa-j') {
[mfa_constraints, methods] = generator([m('pingid')]); // use to test push failures
}
const numbers = (length) =>
Math.random()
.toString()
.substring(2, length + 2);
const mfa_request_id = `${numbers(8)}-${numbers(4)}-${numbers(4)}-${numbers(4)}-${numbers(12)}`;
const mfa_request_id = crypto.randomUUID();
const mfa_requirement = {
mfa_request_id,
mfa_constraints,
Expand Down

0 comments on commit dfdb14b

Please sign in to comment.