Skip to content

Commit 62477cd

Browse files
authored
Merge pull request #31 from osiastedian/bug-001-two-factor-secret-leak
Security: stop returning gAuthSecret in GET /user/verify2fa/:id; only…
2 parents 7850875 + 47fdf64 commit 62477cd

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

controllers/user.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,6 @@ const getUser2fa = async (req, res, next) => {
247247
if (key === 'twoFa' || key === 'gAuth' || key === 'sms') {
248248
// eslint-disable-next-line no-underscore-dangle
249249
userData[key] = user._fieldsProto[key].booleanValue
250-
} else if (key === 'gAuthSecret') {
251-
// eslint-disable-next-line no-underscore-dangle
252-
userData[key] = user._fieldsProto[key].stringValue
253250
}
254251
}
255252
}

0 commit comments

Comments
 (0)