fengtan / ldap-explorer

LDAP client for VS Code
GNU General Public License v3.0
23 stars 2 forks source link

Unable to get children of dc=abc,dc=xyz: missing paged control #56

Closed iamGavinJ closed 7 months ago

iamGavinJ commented 7 months ago

Unable to expand the tree view. It throws the error: Unable to get children of dc=abc,dc=xyz: missing paged control

fengtan commented 7 months ago

Thanks for the report @iamGavinJ !

It sounds like your LDAP server does not support paged search https://github.com/ldapjs/node-ldapjs/blob/v2.3.3/lib/client/search_pager.js#L90-L93

What software powers your LDAP server? (Active Directory, OpenLDAP...) Would you be able to check whether your LDAP server supports paged search?

iamGavinJ commented 7 months ago

Thanks for the quick reply. I'm running lldap; It's a new install.

I'll see if I can find out about pagination support.

fengtan commented 7 months ago

I can't find any documentation about pagination at https://github.com/lldap/lldap, so maybe lldap just does not support this feature.

I have just published pre-release 1.3.1-rc which adds a new checkbox Automatic result paging when editing the connection details: automatic-result-paging.

The checkbox is checked by default for backwards-compatibility reasons (and also because most LDAP servers support pagination), but if you uncheck it then that might fix the problem.

@iamGavinJ would you be able to give it a try? You can download the .vsix archive from the pre-release page and test it locally like this:

install_vsix

cass-e-design commented 7 months ago

I just had the same issue, and this pre-release seems to be working great for me. Thanks!

fengtan commented 7 months ago

Thanks for testing! I have just tagged 1.3.1 and published to VS Code Marketplace.

iamGavinJ commented 7 months ago

Hi @fengtan, thanks for the fast turnaround. I'm seeing the update on the VSC Marketplace, did the update, but I'm not able see the setting. I rolled back to your -rc and also don't see the option:

image

fengtan commented 7 months ago

Hey @iamGavinJ the setting is configured to show up the connection screen rather than the extension settings screen (some of your servers may support paged results while others may not so I made it connection-specific):

ldap-explorer-automatic-result-paging

iamGavinJ commented 7 months ago

urgh of course it is! 🤦🏻‍♂️

Sorry not enough caffeine this morning.

Can confirm, your update works perfectly! Thanks so much. And thanks also for developing this extension; You've really saved my workflow by not having to switch out to some clunky old CLI tool. Really appreciate it!

iamGavinJ commented 7 months ago

Looks like disabling pagination might have caused some of your enumeration logic to fail to see the end of a tree: image

Let me know if you'd prefer I open a new issue.

fengtan commented 7 months ago

Oh that is strange! Sure if you could open a new issue that would be great.

If you search the tree using another tool (e.g. jXplorer), do you get the same behaviour?