aboutsummaryrefslogtreecommitdiff
path: root/cli/_cli.php
diff options
context:
space:
mode:
authorGravatar Clément <clement@selfhost.fr> 2017-02-16 18:54:59 +0100
committerGravatar Clément <clement@selfhost.fr> 2017-02-16 18:54:59 +0100
commit4eeae5171b885b6dda392f5dd68d6dd78a0c7858 (patch)
treef4aebf0654c44838c54fdbb9ec7117f617008b89 /cli/_cli.php
parent8d2b76334cd60356c85810bf4902124105d54ad4 (diff)
use function with preg_match to check username
Diffstat (limited to 'cli/_cli.php')
-rw-r--r--cli/_cli.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/cli/_cli.php b/cli/_cli.php
index 885199659..f5e36eabc 100644
--- a/cli/_cli.php
+++ b/cli/_cli.php
@@ -20,9 +20,7 @@ function fail($message) {
}
function cliInitUser($username) {
- $aValid = array('-', '_', '.');
-
- if (!ctype_alnum(str_replace($aValid, '', $username))) {
+ if (!FreshRSS_user_Controller::checkUsername($username)) {
fail('FreshRSS error: invalid username: ' . $username . "\n");
}