mirror of
https://github.com/antonioribeiro/google2fa.git
synced 2026-04-26 08:35:54 +03:00
[GH-ISSUE #24] Generated secret key isn't cryptographically secure #247
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/google2fa#247
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aik099 on GitHub (Mar 11, 2016).
Original GitHub issue: https://github.com/antonioribeiro/google2fa/issues/24
The
Google2FA::generateSecretKeymethod internally usesGoogle2FA::getRandomNumber, which usesmt_randfunction. According to its documentation (see http://php.net/mt_rand) it should not be used in security-related contexts.Since current usage exactly qualifies as security related context I'm proposing to:
random_intfunction, that was added only in PHP 7random_intinstead ofmt_randIf you're interested I can send a PR.
@base-zero commented on GitHub (May 9, 2016):
👍
@overint commented on GitHub (Jun 1, 2016):
This should definitely be changed. @aik099 did you create a pull request?
@aik099 commented on GitHub (Jun 1, 2016):
I haven't yet. If you'd like I can create it this week.
@aik099 commented on GitHub (Jun 1, 2016):
PR created and ready for review.