tweak the default password len when request doesnt specify a length
@@ -555,6 +555,11 @@ func CreateUser(request *msgs.CreateUserRequest) msgs.CreateUserResponse {
log.Debug(msg)
resp.Results = append(resp.Results, msg)
}
+
+ if request.PasswordLength == 0 {
+ request.PasswordLength = defaultPasswordLength
+ }
+
newPassword := util.GeneratePassword(request.PasswordLength)
if request.Password != "" {
newPassword = request.Password
