U2FServer::createChallenge() fails in PHP 7.4
MauricioFauth opened this issue ยท 5 comments
Samyoul\U2F\U2FServer\U2FServer::createChallenge()
always throws an exception in PHP 7.4.
Samyoul\U2F\U2FServer\U2FException: Unable to obtain a good source of randomness
openssl_random_pseudo_bytes
has changed in PHP 7.4.
See RFC: https://wiki.php.net/rfc/improve-openssl-random-pseudo-bytes
Hey, thank you for this. I have another method of generating random bytes, I will implement a fix for this.
As you can see on https://github.com/code-lts/U2F-php-server/runs/1332881031?check_suite_focus=true in #9 this seems to run fine. Maybe you have an idea why ?
@Samyoul if we agree to be supporting only php 7 and upwards we could switch to https://www.php.net/manual/en/function.random-bytes.php else add a fallback onto it for php 7+ versions
@MauricioFauth I can not reproduce this, nor the tests
could you help me with this ?
@MauricioFauth I can not reproduce this, nor the tests could you help me with this ?
I remember it appeared in phpMyAdmin's testsuite, but I don't know how to reproduce it now.