Closed llaville closed 7 years ago
Good catch. Maybe a better approach is simply check whether the function exists or not. Something like this: http://php.net/manual/en/function.random-bytes.php#118932 Do you want to work on a pull request? Thank you!
Nice TIP (manual page). OK I'll work on a PR tomorrow !
Code is available on my forked version at https://github.com/llaville/psr7-middlewares/commit/236fbaea99e236135cfab0122f1a1a027b7ab62a (for code review, if you want). I'll test it in real condition tomorrow, and gave you my feedback !
PR #63 is available !
Merged. Thanks for your contribution 👍
Hello,
I've recently used Csrf Middleware with PHP 5.6 and cannot run it due to
generateTokens()
function.random_bytes
is only available since PHP 7.0I suggest to use openssl extension such as :
What do you think of such solution ?