Merge pull request #5622 from shleeable/patch-16

FILTER_SANITIZE_STRING filter was deprecated in PHP 8.1.0. Use htmlspecialchars()
pull/5669/head
daniel 11 months ago committed by GitHub
commit 72150d4797
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -90,7 +90,7 @@ class FixUsernames extends Command
break; break;
case $opts[1]: case $opts[1]:
$new = filter_var($old, FILTER_SANITIZE_STRING|FILTER_FLAG_STRIP_LOW); $new = htmlspecialchars($old, ENT_QUOTES, 'UTF-8');
if(strlen($new) < 6) { if(strlen($new) < 6) {
$new = $new . '_' . str_random(4); $new = $new . '_' . str_random(4);
} }

Loading…
Cancel
Save