Skip to content

empty attribute values are being treated falsely as parsing error #21

Open
@nikkicoon

Description

@nikkicoon

Is a linebreak considered an empty value?

		b, err := os.ReadFile(*f)
		if err != nil {
			fmt.Println(err)
		}
		res, err = pkg.ParseUsers(string(b))

where ParseUsers(b) is a function which utilizes ldif.Parse, for an ldif file with several entries I get "Error in line 29: empty value" even when I cut it down to the first two chunks of entries and the file has no line 29 (sorry for the words used, I merely write code which deals with data I get handed and don't have much experience with ldap).

My assumption from the ldif dump I got, and the tests I've seen in your code, is that ldif entries are separated by linebreaks. Why does this happen?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions