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
We would like to alter this behavior, since it causes a number of issues for us; but it's not clear what the intended behavior should be. If folks can agree on how this case should be handled, we would be willing to implement and PR a change.
Random thoughts based on an investigation into this:
Simply raising the UnknownBERTag (it is an Exception) would be the simplest way to handle it. However, that might not be the ideal behavior when the unknown tag is in some optional piece of LDAP that we can simply ignore if it's unrecognized.
Returning None can cause issues if we're decoding a multi-part LDAP message with berDecodeMultiple - in that case the unknown tag is simply skipped (
There is a TODO that implies better handling of an unknown BER type was intended:
ldaptor/ldaptor/protocols/pureber.py
Line 382 in 4bfe289
We would like to alter this behavior, since it causes a number of issues for us; but it's not clear what the intended behavior should be. If folks can agree on how this case should be handled, we would be willing to implement and PR a change.
Random thoughts based on an investigation into this:
Simply raising the UnknownBERTag (it is an Exception) would be the simplest way to handle it. However, that might not be the ideal behavior when the unknown tag is in some optional piece of LDAP that we can simply ignore if it's unrecognized.
Returning None can cause issues if we're decoding a multi-part LDAP message with berDecodeMultiple - in that case the unknown tag is simply skipped (
ldaptor/ldaptor/protocols/pureber.py
Line 399 in 4bfe289
But if we then assume the LDAP message has a certain number of parts (as in
ldaptor/ldaptor/protocols/pureldap.py
Line 164 in 4bfe289
This is similar to #137 but the OP there is simply asking what a certain unknown tag is, not how to handle it.
The text was updated successfully, but these errors were encountered: