ui: mfa: use proper request id generation (#17835)
* ui: mfa: use proper request id generation Fixes: 712cc9ee, ca14c191 Signed-off-by: Konstantin Demin <rockdrilla@gmail.com> Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
This commit is contained in:
parent
848d20d1c4
commit
5330d34cea
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
ui: mfa: use proper request id generation
|
||||
```
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue