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
Traceback (most recent call last):
File "/Users/xdesai/junk/python_weirdness/modify_op_bug.py", line 17, in <module>
new_op = ModifyOp.fromLDAP(ldap_req)
File "/Users/xdesai/junk/python_weirdness/3env/lib/python3.9/site-packages/ldaptor/delta.py", line 166, in fromLDAP
for op, mods in request.modification:
ValueError: too many values to unpack (expected 2)
I dug into the code a bit. It seems to think that the modification field on the LDAPModifyRequest is a list of tuples because it tries to unpack it with this line for op, mods in request.modification:
but when I print the repr() of my LDAPModifyRequest. The modification field is just a list of byte strings.
Hey ldaptor team!
I was working with the ModifyOp class and discovered what I believe to be a bug with the deserialization from LDAP.
Here is a small snippet of code that I reproduces the error I'm seeing.
The output:
I dug into the code a bit. It seems to think that the
modification
field on theLDAPModifyRequest
is a list of tuples because it tries to unpack it with this linefor op, mods in request.modification:
but when I print the
repr()
of myLDAPModifyRequest
. Themodification
field is just a list of byte strings.This where I started to get over my head so I decided to file an issue. Let me know if you have any questions!
The text was updated successfully, but these errors were encountered: