-
Notifications
You must be signed in to change notification settings - Fork 26
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
use php_mt_rand_range for 8.4 #19
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that PHP 7.2 apparently is the minimally supported version, this should just use php_random_bytes()
and not fall back to insecure randomness.
using mcrypt is a security problem in all cases, as the library is dead for >10 years ;) |
Grab php/pecl-encryption-mcrypt#19 which just uses php_mt_rand_range rather than now-removed php_rand.
Grab php/pecl-encryption-mcrypt#19 which just uses php_mt_rand_range rather than now-removed php_rand.
Can we see this merged @derickr ? |
First, just add the modules, copying from 8.3 versions. $ for p in php-8.3-*.yaml; do sed -e 's,epoch: .*,epoch: 0,' \ -e 's,name: php-8.3-,name: php-8.4-,' \ "$p" > php-8.4${p#php-8.3}; done Then fix some to build with 8.4, cherry picking from upstream. * php-8.4-pecl-mcrypt - cherry-pick a PR to build for 8.4 Grab php/pecl-encryption-mcrypt#19 which just uses php_mt_rand_range rather than now-removed php_rand. * php-8.4-imagick - cherry pick pr to build for 8.4 Grab Imagick/imagick#690 to replace php_strlower with zend_str_tolower * php-8.4-xdebug - cherry pick several upstream changes NOTE: I have very low confidence in this, other than it builds. xdebug is active and likely to release a 3.4.0 release soon that has php 8.4 support properly. By adding php-8.4-xdebug with updates enabled, we will get a PR automatically made and hopefully landed just by dropping the cherry-picks here. * Drop php-8.4-swoole - not supported upstream yet. Several changes would be needed to make the 5.1.5 version of swoole build with php 8.4. Upstream explicitly removed support from the 5.1 branch swoole/swoole-src#5525 There is likely 6.0.0 release coming soon (beta released 2024-10-17). We will have to manually re-add at that point in time. * php-8.4-memcached and php-8.4-redis are separated out to another PR as they are dependent on php-8.4-igbinary output.
php_mt_rand_range exists since 5.6
php_rand dropped in 8.4