diff --git a/pkg/catalog/config/constants.go b/pkg/catalog/config/constants.go index 0ee9f437bb..113cb11509 100644 --- a/pkg/catalog/config/constants.go +++ b/pkg/catalog/config/constants.go @@ -31,7 +31,7 @@ const ( CLIConfigFileName = "config.yaml" ReportingConfigFilename = "reporting-config.yaml" // Version is the current version of nuclei - Version = `v3.2.9` + Version = `v3.3.0-dev` // Directory Names of custom templates CustomS3TemplatesDirName = "s3" CustomGitHubTemplatesDirName = "github" diff --git a/pkg/js/libs/ldap/ldap.go b/pkg/js/libs/ldap/ldap.go index 5f03611cb2..31afa232d0 100644 --- a/pkg/js/libs/ldap/ldap.go +++ b/pkg/js/libs/ldap/ldap.go @@ -205,11 +205,18 @@ func (c *Client) AuthenticateWithNTLMHash(username, hash string) { // ``` func (c *Client) Search(filter string, attributes ...string) []map[string][]string { c.nj.Require(c.conn != nil, "no existing connection") + c.nj.Require(c.BaseDN != "", "base dn cannot be empty") + c.nj.Require(len(attributes) > 0, "attributes cannot be empty") res, err := c.conn.Search( ldap.NewSearchRequest( - c.BaseDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, - 0, 0, false, filter, attributes, nil, + "", + ldap.ScopeBaseObject, + ldap.NeverDerefAliases, + 0, 0, false, + filter, + attributes, + nil, ), ) c.nj.HandleError(err, "ldap search request failed")