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:
commit
1671e32618
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user