Update username constraints

https://github.com/FreshRSS/FreshRSS/issues/1597
This commit is contained in:
Alexandre Alapetite
2017-07-22 15:47:13 +02:00
parent 16b269f33d
commit c3f2302be7
3 changed files with 5 additions and 5 deletions

View File

@@ -81,11 +81,11 @@ if ($requirements['all'] !== 'ok') {
}
if (!FreshRSS_user_Controller::checkUsername($options['default_user'])) {
fail('FreshRSS invalid default username (must be ASCII alphanumeric): ' . $options['default_user']);
fail('FreshRSS error: invalid default username ' . $options['default_user'] . '”! Must be matching ' . FreshRSS_user_Controller::USERNAME_PATTERN);
}
if (isset($options['auth_type']) && !in_array($options['auth_type'], array('form', 'http_auth', 'none'))) {
fail('FreshRSS invalid authentication method (auth_type must be one of { form, http_auth, none }: ' . $options['auth_type']);
fail('FreshRSS invalid authentication method (auth_type must be one of { form, http_auth, none }): ' . $options['auth_type']);
}
if (file_put_contents(join_path(DATA_PATH, 'config.php'), "<?php\n return " . var_export($config, true) . ";\n") === false) {