diff options
| author | 2019-06-22 00:06:08 +0200 | |
|---|---|---|
| committer | 2019-06-22 00:06:08 +0200 | |
| commit | 6fe9ec9f7662008aa7a0cdb783cf769b9c588b19 (patch) | |
| tree | cc63ea08df6b1c2f69a45b994b426da19fd9fae3 /app/install.php | |
| parent | 1a7a28e977a81249a7d8c4dd43ecbf98c262d2e1 (diff) | |
Allow email as admin username (#2421)
Fix https://github.com/FreshRSS/FreshRSS/issues/2418
https://github.com/FreshRSS/FreshRSS/pull/2407
Diffstat (limited to 'app/install.php')
| -rw-r--r-- | app/install.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/install.php b/app/install.php index b15cc76ea..e5142628d 100644 --- a/app/install.php +++ b/app/install.php @@ -125,7 +125,9 @@ function saveStep2() { $_SESSION['title'] = $system_default_config->title; $_SESSION['old_entries'] = param('old_entries', $user_default_config->old_entries); $_SESSION['auth_type'] = param('auth_type', 'form'); - $_SESSION['default_user'] = substr(preg_replace('/[^0-9a-zA-Z_]/', '', param('default_user', '')), 0, 38); + if (FreshRSS_user_Controller::checkUsername(param('default_user', ''))) { + $_SESSION['default_user'] = param('default_user', ''); + } $password_plain = param('passwordPlain', false); if ($password_plain !== false && cryptAvailable()) { |
