MM-19553: Generate valid passwords on bulk import. (#12871)
This changes the bulk import so when it needs to generate a password because no password or auth data was supplied, it now takes into account the configured minimum length, as well as assuming all other distinct character types are configured to be required. It should now generate valid passwords regardless of the password policy configuration in the Mattermost configuration file.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f9a7a16a78
Коммит
1b95ee9834
@@ -334,7 +334,7 @@ func (a *App) ImportUser(data *UserImportData, dryRun bool) *model.AppError {
|
||||
authData = nil
|
||||
} else {
|
||||
// If no AuthData or Password is specified, we must generate a password.
|
||||
password = model.NewId()
|
||||
password = model.GeneratePassword(*a.Config().PasswordSettings.MinimumLength)
|
||||
authData = nil
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user