Merge pull request #1465 from apt-ghetto/fixRootUsername

[users] Do not allow 'root' as username
main
Adriaan de Groot 5 years ago committed by GitHub
commit a01c428270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save