mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-25 03:15:44 -05:00
Merge pull request #1465 from apt-ghetto/fixRootUsername
[users] Do not allow 'root' as username
This commit is contained in:
commit
a01c428270
1 changed files with 7 additions and 0 deletions
|
@ -409,6 +409,13 @@ UsersPage::validateUsernameText( const QString& textRef )
|
|||
tr( "Only lowercase letters, numbers, underscore and hyphen are allowed." ) );
|
||||
m_readyUsername = false;
|
||||
}
|
||||
else if ( 0 == QString::compare("root", text, Qt::CaseSensitive ) )
|
||||
{
|
||||
labelError( ui->labelUsername,
|
||||
ui->labelUsernameError,
|
||||
tr( "'root' is not allowed as user name." ) );
|
||||
m_readyUsername = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
labelOk( ui->labelUsername, ui->labelUsernameError );
|
||||
|
|
Loading…
Add table
Reference in a new issue