Skip to content
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

Controls not working with mock sync? #1113

Open
niksite opened this issue Nov 28, 2023 · 0 comments
Open

Controls not working with mock sync? #1113

niksite opened this issue Nov 28, 2023 · 0 comments

Comments

@niksite
Copy link

niksite commented Nov 28, 2023

When using a real connection, controls=[('2.16.840.1.113719.1.27.103.7', True, 'sn')] works perfectly. However, when using client_strategy=MOCK_SYNC, I am encountering the following error:

control = ('2.16.840.1.113719.1.27.103.7', True, 'sn')

    @staticmethod
    def decode_control(control):
        """
        decode control, return a 2-element tuple where the first element is the control oid
        and the second element is a dictionary with description (from Oids), criticality and decoded control value
        """
>       control_type = str(control['controlType'])
E       TypeError: tuple indices must be integers or slices, not str

.direnv/python-3.9/lib/python3.9/site-packages/ldap3/strategy/base.py:580: TypeError

It seems that the controls in the case of MOCK_SYNC are not passed through build_control or something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant