inejge / ldap3

A pure-Rust LDAP library using the Tokio stack
Apache License 2.0
220 stars 38 forks source link

Invalid search filter causes an unwrap panic #19

Closed lawliet89 closed 4 years ago

lawliet89 commented 7 years ago

Consider some incorrect search filter:

    let (result, _) = connection
        .search("dc=example,dc=com", Scope::Subtree, "", vec!["*"])?
        .success()?;

This will cause a panic. I believe it is due to this line.

inejge commented 7 years ago

Yes, it's one of the places where error handling is not what it should be. Fixed in 25b99eea70e51d9a994d9c144191d5213da188bc. I won't cut a new release since this should be low-impact, and there are a couple of other issues I'd like to address first. I'll leave the issue open until then.

gj commented 5 years ago

@inejge seems like the fix was shipped in 0.6.0. Can this be closed?

inejge commented 4 years ago

Very belatedly, closing this. Error handling in general has been overhauled, and this case is included.