You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given output from ldapsearch -L ... the first line as being version: 1.
From ldapsearch(1) manual page:
-L: Search results are display in LDAP Data Interchange Format detailed in ldif(5). A single -L restricts the output to LDIFv1.
A second -L disables comments. A third -L disables printing of the LDIF version. The default is to use an extended version of LDIF.
I used -L because without it you get an 'extended version' which includes a line result: 0 success (and one other), which results in a parse failure.
With -L you still get a version: 1 line. This does parse successfully, but leaves the first Entry in Entries as nil, which subsequently causes the AllEntries() method to crash because it tries to dereference a nil pointer.
As a workaround, I either have to use -LLL, or use -L and remove the first line, which is version: 1.
I am using github.com/go-ldap/ldif v0.0.0-20200320164324-fd88d9b715b3
Thank you for creating this library, it is very useful for me at the moment as I get back to some Go.
The text was updated successfully, but these errors were encountered:
Given output from
ldapsearch -L ...
the first line as beingversion: 1
.From ldapsearch(1) manual page:
I used
-L
because without it you get an 'extended version' which includes a lineresult: 0 success
(and one other), which results in a parse failure.With
-L
you still get aversion: 1
line. This does parse successfully, but leaves the first Entry in Entries as nil, which subsequently causes theAllEntries()
method to crash because it tries to dereference a nil pointer.As a workaround, I either have to use
-LLL
, or use-L
and remove the first line, which isversion: 1
.I am using
github.com/go-ldap/ldif v0.0.0-20200320164324-fd88d9b715b3
Thank you for creating this library, it is very useful for me at the moment as I get back to some Go.
The text was updated successfully, but these errors were encountered: