Merge pull request #17058 from lrb2/fix-blowfish-secret

Merge #17058 - Fix #17054 - `DEL` character in generated random strings

Pull-requet: #17058
Fixes: #17054
This commit is contained in:
William Desportes 2021-08-08 01:58:21 +02:00 committed by GitHub
commit 1671e32618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3017,8 +3017,8 @@ class Util
// Get random byte and strip highest bit
// to get ASCII only range
$byte = ord((string) $random_func(1)) & 0x7f;
// We want only ASCII chars
if ($byte <= 32) {
// We want only ASCII chars and no DEL character (127)
if ($byte <= 32 || $byte === 127) {
continue;
}