-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
feat(core): Use WebCrypto to generate all random numbers and strings #9786
Conversation
packages/cli/test/integration/credentials/credentials.api.test.ts
Outdated
Show resolved
Hide resolved
✅ No visual regressions found. |
892d62a
to
99402df
Compare
test('PATCH /me/password should fail due to missing MFA token', async () => { | ||
const { user, rawPassword } = await createUserWithMfaEnabled(); | ||
|
||
const newPassword = randomPassword(); | ||
|
||
await testServer | ||
.authAgentFor(user) | ||
.patch('/me/password') | ||
.send({ currentPassword: rawPassword, newPassword }) | ||
.expect(400); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RicardoE105 Can you please confirm if this test was invalid?
The 400
is coming from the new password not passing the password policy, and I don't see any MFA checks in any of the /me
endpoints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just saw this message. Having a look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this was mistake. But this raises the question: Should we ask for MFA token if the user tries to update the password when it's logged in? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we ask for MFA token if the user tries to update the password
2fdd17e
to
ad07c6b
Compare
…cally-safe-integers
…to tests" This reverts commit 7e7e659.
|
2 flaky tests on run #5586 ↗︎
Details:
e2e/5-ndv.cy.ts • 2 flaky tests
Review all test suite changes for PR #9786 ↗︎ |
✅ All Cypress E2E specs passed |
Got released with |
1 similar comment
Got released with |
Summary
Math.random
is considered insecure.This PR replaces it with WebCrypto based random number and string generators.
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/SEC-51
Review / Merge checklist