diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 4d07ccc..36ce132 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -333,22 +333,6 @@ namespace AyaNova.PlugIn.V8 private async System.Threading.Tasks.Task ExportUsers(ProgressForm progress) { - //List objectExcludeProperties = new List(standardExcludePropertiesList); - //objectExcludeProperties.Add("LastView"); - //objectExcludeProperties.Add("LastSchedGroupID"); - //objectExcludeProperties.Add("LastSchedStartDate"); - //objectExcludeProperties.Add("LastSchedStopDate"); - //objectExcludeProperties.Add("LastSchedView"); - //objectExcludeProperties.Add("ScheduleLastGraphicalPrintSettings"); - //objectExcludeProperties.Add("MainGridLastRowCount"); - //objectExcludeProperties.Add("ScheduleLastViewOpenOnly"); - //objectExcludeProperties.Add("IsAdministrator"); - //objectExcludeProperties.Add("IsGenerator"); - //objectExcludeProperties.Add("IsScheduleable"); - //objectExcludeProperties.Add("IsClientOrHeadOfficeAccount"); - //objectExcludeProperties.Add("IsClientAccount"); - //objectExcludeProperties.Add("IsHeadOfficeAccount"); - //objectExcludeProperties.Add("OrganizationTypeAndID"); UserPickList pl = UserPickList.GetList(false); progress.Append("Dumping " + pl.Count.ToString() + " Users"); @@ -370,6 +354,8 @@ namespace AyaNova.PlugIn.V8 d.active = false;//all imported users are inactive to start d.roles = 0;//todo: try to determine role from v7 member of group? or is that even possible? + d.login = util.RandomString(); + d.password = util.RandomString(); d.employeeNumber = c.EmployeeNumber; d.notes = c.Notes; diff --git a/source/Plugins/AyaNova.Plugin.V8/util.cs b/source/Plugins/AyaNova.Plugin.V8/util.cs index a0842fe..a931ae1 100644 --- a/source/Plugins/AyaNova.Plugin.V8/util.cs +++ b/source/Plugins/AyaNova.Plugin.V8/util.cs @@ -7,6 +7,7 @@ using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; using Newtonsoft.Json.Linq; +using System.Security.Cryptography; namespace AyaNova.PlugIn.V8 @@ -189,6 +190,17 @@ namespace AyaNova.PlugIn.V8 #region Misc utils + //used to set nonsense values from imported user login and password + //just in case they are set active after import but never have their passwords set + //so they can't be as easily hacked into + public static string RandomString() + { + var b = new byte[32]; + var random = RandomNumberGenerator.Create(); + random.GetNonZeroBytes(b); + return Convert.ToBase64String(b); + } + public static string NormalizeTag(string inObj) { //Must be lowercase per rules