Skip to content
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

This proposes to introduce a random number generator class #910

Open
wants to merge 1 commit into
base: b-7.0.x
Choose a base branch
from

Conversation

geeky
Copy link
Contributor

@geeky geeky commented Feb 25, 2023

This proposes to introduce a random number generator class which can follow the state of the art for random number generation) and to change source code places that work with random numbers to use this class. Also deprecates older mechanisms.
Currently only acts as a wrapper arround random_bytes() and random_int()
Places that don't actually require cryptographically-secure randomness are also changed, as they would otherwise appear as false positives in pentests.

Related:
https://php.watch/articles/testing-php-rand-functions
https://github.com/matomo-org/matomo/pull/15263/files

… follow the state of the art for random number generation) and to change source code places that work with random numbers to use this class. Also deprecates older mechanisms.

Places that don't actually require cryptographically-secure randomness are also changed, as they would otherwise appear as false positives in pentests.

Related:
https://php.watch/articles/testing-php-rand-functions
https://github.com/matomo-org/matomo/pull/15263/files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant