Skip to content

addControlDescriptions would panic at control without critcality and value #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vetinari opened this issue Aug 14, 2016 · 0 comments · Fixed by #92
Closed

addControlDescriptions would panic at control without critcality and value #86

vetinari opened this issue Aug 14, 2016 · 0 comments · Fixed by #92

Comments

@vetinari
Copy link
Contributor

a fix similar to #83 should be applied here also (ldap.go)

func addControlDescriptions(packet *ber.Packet) {
    packet.Description = "Controls"
    for _, child := range packet.Children {
        child.Description = "Control"
        child.Children[0].Description = "Control Type (" + ControlDescription(child.Children[0].Value.(string)) + ")"
        value := child.Children[1]
        if len(child.Children) == 3 {
            child.Children[1].Description = "Criticality"
            value = child.Children[2]
        }
        value.Description = "Control Value"
vetinari added a commit to vetinari/ldap that referenced this issue Aug 15, 2016
apply similar patch like in go-ldap#83, closes go-ldap#86
vetinari added a commit to vetinari/ldap that referenced this issue Sep 24, 2016
* apply similar patch like in go-ldap#83, closes go-ldap#86
* add tests for adding ControlDescriptions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant