Only posible to get sharees by using the username: Username: `einstein` Display Name: `Albert Einstein` results are fetched only matching `einstein` `Albert`, `Einstein`, `Ein`, `Albe` do not match and response is empty (always forgetting the case sensitiveness) oC10: matches with both. Backend: EOS storage via via https://github.com/owncloud-docker/compose-playground/blob/master/examples/hetzner-deploy/make_ocis_eos_compose_test.sh Version: v1.0.0-rc1 Client: iOS App v11.4 over iOS13 CC @pmaier1
Activity
refs commentedon Jan 13, 2021
I added the EOS storage tag but most likely is related with the Reva userprovider.
micbar commentedon Jul 14, 2022
re tested:
Created User
Username: hans
Display Name: Peter Dampf
E-Mail: [email protected]
We can find:
hansPeterpd@We cannot find:
Hans(should not be case sensitive)ans(middle of the username)Dampf(End of the string Displayname)example.com(End of the email address)Expectation
at least
Hans(username search should not be case sensitive)Dampf(End or middle of the string Displayname)Should work.
rhafer commentedon Jul 14, 2022
This is caused by a bug in idm. Fix is on its way.
This is currently not working "on purpose". At some point we agreed on limiting search to prefix searches. As doing full substring searches will get pretty expensive easily. We can of course change that (just need to adjust the filter https://github.com/cs3org/reva/blob/75f2c2f836578f8280749569f7f01a3e7d2b5939/pkg/utils/ldap/identity.go#L480).
@micbar If you still want it. Should we maybe make that configurable?
rhafer commentedon Jul 14, 2022
This part should be fixed with libregraph/idm#75
27 remaining items
SwikritiT commentedon Jul 21, 2022
The tests are failing because they search for the
exactmatch for a searched string but this field is always empty forOCISFor instance if I create a multiple variations of user
einsteininOC10and search it with curlcurl -vk -uadmin:admin http://localhost/core/ocs/v1.php/apps/files_sharing/api/v1/sharees\?search\=einstein\&itemType\=file -H"OCS-APIREQUEST:1" | xmllint --format -It responds with
Inside
<exact><users>there'sexactmatch of the stringBut in the case of
OCISif i do the sameThe
exactmatch is rather given in<users>The tests are looking inside
exactand they don't find the expected value there.Is this expected behaviour?
cc: @micbar @rhafer @phil-davis
rhafer commentedon Jul 22, 2022
@SwikritiT thanks for looking into that. I think this deserves a separate issue though, would you mind creating a new one for this?
I think the original bug reported here (which was about broken substring and case-sensitiveness) was solved.
It seems the new issue is basically caused by an incomplete implementation of the ocs sharing api in ocis/reva. It always returns an empty
exactlist and stuffs all the results into the top leveluserslist (https://github.com/cs3org/reva/blob/master/internal/http/services/owncloud/ocs/handlers/apps/sharing/sharees/sharees.go#L91)SwikritiT commentedon Jul 25, 2022
Okay I'll create a separate issue and close this one
SwikritiT commentedon Jul 25, 2022
@rhafer new issue created here #4265
SwikritiT commentedon Jul 25, 2022
Closing this issue. I'll make a PR changing the issue link in expected to fail file
Bump libregraph/idm to latest master
Allow configuration of substring search for searching sharees
Add config for setting search_min_length capability