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

[SECURITY] phpsec/random.php - mcrypt isn't properly error checked #115

Open
AndrewCarterUK opened this issue Nov 26, 2015 · 0 comments
Open

Comments

@AndrewCarterUK
Copy link
Contributor

Note: I have been asked to log all the security issues that I have found by an OWASP contributor to support the decision to abandon this project. My personal opinion is that all of the code in this repository is beyond repair and that it is not wise to attempt to fix it.

The mcrypt API results should be checked to see if there has been an error. If there has been, the functions should fail hard rather than mask the error as a success.

return substr(bin2hex(mcrypt_create_iv($length, MCRYPT_DEV_URANDOM)), 0, $length);

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

No branches or pull requests

1 participant