kanidm / ldap3

Rust LDAP3 Server Protocol Library
Mozilla Public License 2.0
53 stars 11 forks source link

20230905 improve errors ber sizing #31

Closed Firstyear closed 1 year ago

Firstyear commented 1 year ago

Fixes #28 - this is a large clean up that improves error handling, better support for controls, resolves a lot of clippy lints, and add's max-ber-size limiting to the ldapcodec.

Firstyear commented 1 year ago

@nitnelave Updated with improved debug display of fields.

nitnelave commented 1 year ago

Sorry for some reason I couldn't comment on the line (I blame the mobile interface). In the bytes_to_string, it would make sense to know when something is base 64 or not. Maybe

field: "raw_string"
field: base64[abcde123]

WDYT ?

Firstyear commented 1 year ago

I think you're right, it helps to distinguish the two cases (a string that has base64 chars, vs binary that was b64ed for debug).