diff options
| author | 2017-02-15 14:20:49 +0100 | |
|---|---|---|
| committer | 2017-02-15 14:20:49 +0100 | |
| commit | 08857c679d700b982a1af21ce11c4b25e125e44a (patch) | |
| tree | aa246c7f2195fa3ff008bbaecdf125f885d06e68 /cli/create-user.php | |
| parent | 5a1bb1393b4496eb35a2ffb3cc63d41c9dc1e2e5 (diff) | |
add - _ and . in accepted char
Diffstat (limited to 'cli/create-user.php')
| -rwxr-xr-x | cli/create-user.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/create-user.php b/cli/create-user.php index 444264cc7..e5b4493e3 100755 --- a/cli/create-user.php +++ b/cli/create-user.php @@ -16,8 +16,9 @@ if (empty($options['user'])) { fail('Usage: ' . basename(__FILE__) . " --user username ( --password 'password' --api-password 'api_password'" . " --language en --email user@example.net --token 'longRandomString --no-default-feeds' )"); } +$aValid = array('-', '_', '.'); $username = $options['user']; -if (!ctype_alnum($username)) { +if (!ctype_alnum(str_replace($aValid, '', $username))) { fail('FreshRSS error: invalid username “' . $username . '”'); } |
