Skip to content

Commit bb7e5a5

Browse files
gabriellshtassoevan
authored andcommitted
fix: Password sent unencrypted
1 parent 6fb88e1 commit bb7e5a5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

apps/meteor/client/lib/2fa/process2faReturn.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,13 @@ export const invokeTwoFactorModal = async (
141141
props: {
142142
...props,
143143
onConfirm: async (code: string, method: string): Promise<void> => {
144+
const actualCode = method === 'password' ? SHA256(code) : code;
144145
if (validateCode) {
145-
await validateCode(code, method);
146+
await validateCode(actualCode, method);
146147
}
147148
isResolved = true;
148149
imperativeModal.close();
149-
resolve(method === 'password' ? SHA256(code) : code);
150+
resolve(actualCode);
150151
},
151152
onClose: (): void => {
152153
if (isClosed) {

0 commit comments

Comments
 (0)