Bug Fix #58: Fail to assign MacSecureEnrol devices
Various code-paths *assumed* valid domain account ids as long as an id existed (simple null-check). Correct checks for valid domain account ids has been implemented.
This commit is contained in:
@@ -180,7 +180,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
device.DeviceProfile = p;
|
||||
|
||||
// Update AD Account
|
||||
if (!string.IsNullOrEmpty(device.DeviceDomainId) && device.DeviceDomainId.Length <= 24)
|
||||
if (ActiveDirectory.IsValidDomainAccountId(device.DeviceDomainId))
|
||||
{
|
||||
var adMachineAccount = ActiveDirectory.RetrieveADMachineAccount(device.DeviceDomainId);
|
||||
if (adMachineAccount != null)
|
||||
|
||||
Reference in New Issue
Block a user