diff --git a/src/CommonLib/LdapConnectionPool.cs b/src/CommonLib/LdapConnectionPool.cs index d9cf7328..604591a2 100644 --- a/src/CommonLib/LdapConnectionPool.cs +++ b/src/CommonLib/LdapConnectionPool.cs @@ -618,6 +618,10 @@ private bool CallDsGetDcName(string domainName, out NetAPIStructs.DomainControll } public async Task<(bool Success, LdapConnectionWrapper ConnectionWrapper, string Message)> GetGlobalCatalogConnectionAsync() { + if (_blacklistedDomains.Contains(_identifier)) { + return (false, null, $"Identifier {_identifier} blacklisted for connection attempt"); + } + if (!_globalCatalogConnection.TryTake(out var connectionWrapper)) { var (success, connection, message) = await CreateNewConnection(true); if (!success) {