-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Sharees endpoint doesn't respect limit for ldap users #8454
Comments
That's odd, the code passes the limit (which is a per-backend limit anyhow) through to the backends. You don't have log files by chance? |
I don't see anything relevant in the logs, but I can recreate that instance later and check the clean log file after that.
Here is the ldap config if that is of interest:
|
We're talking about NC 13/master? IIRC oc_cards should not be in that code path (but then ldap users should not show up after disabling this). |
It is happening on master for me. I'll reproduce that again and try to provide proper logs. |
Ok, there is nothing in the logs, but oc_cards is being filled with ldap users,as soon as I start using the files_sharing endpoint (e.g. by starting to share a file). |
@juliushaertl Looks like this could have been fixed by #8206 already. Could you give it another try. cc @nickvergessen for confirmation. |
yeah should be fixed with #8206 With that you should at most receive 2 users (one matched by user name and one by email) |
I can still reproduce that with #8206 merged. I have 1000 users setup in my LDAP (all with email addresses) and when running the API request as described in the curl above, the users section contains all 1000 users. The $searchResult['users'] array is being filled here:
|
Ok, I was actually getting the API wrong, the share providers should be specified by using the shareType GET parameter. As I was using an itemType that is not file/folder it was always including SHARE_TYPE_EMAIL as from:
Anyway the MailPlugin still always returns all users when included in the query. |
Steps to reproduce
curl 'http://admin:admin@localhost:8140/ocs/v2.php/apps/files_sharing/api/v1/sharees?format=json&search=&perPage=1&itemType=emails' -H 'OCS-APIREQUEST: true'
Expected behaviour
The result set in ocs.data.users should only contain 1 entry
Actual behaviour
The result set in ocs.data.users contains all ldap users
Came up in nextcloud/deck#422 but I can reproduce that in the files app, where searching for a user to share with takes ages with 1000 users in ldap.
@nextcloud/sharing @nextcloud/ldap
The text was updated successfully, but these errors were encountered: