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

Cannot share with short user names #31058

Closed
PVince81 opened this issue Apr 9, 2018 · 9 comments
Closed

Cannot share with short user names #31058

PVince81 opened this issue Apr 9, 2018 · 9 comments
Assignees
Labels
p1-urgent Critical issue, need to consider hotfix with just that issue regression Type:Bug
Milestone

Comments

@PVince81
Copy link
Contributor

PVince81 commented Apr 9, 2018

Steps

  1. Setup OC from stable10 (after Configurable minimum characters before autocomplete user searches #30313)
  2. Create a user with id "tom"
  3. Try sharing a folder with "tom" by typing these three letters

Expected result

Exact match found.

Actual result

The search did not start.

Version

stable10 9b49b21

@VicDeo @tomneedham @pmaier1 I think we should let the frontend send any search query starting with one character. However the backend will only return either exact matches for the number of characters, or provide a list of partial matches if the search string has the minimum number of configured characters as per #30313

@PVince81 PVince81 added Type:Bug regression p1-urgent Critical issue, need to consider hotfix with just that issue labels Apr 9, 2018
@PVince81 PVince81 added this to the development milestone Apr 9, 2018
@ownclouders
Copy link
Contributor

GitMate.io thinks possibly related issues are #16903 (Sharing. It is not allowed to share a file with a user named with only one character), #2222 (Can't change shared Calendar entry by another user), #2219 (Can't change shared file by another user), #9544 (Can't Change Full Name for Users), and #29279 (cannot share with a user that has the same name as a group).

@VicDeo
Copy link
Member

VicDeo commented Apr 9, 2018

config.php:
'user.search_min_length' => 3,

@tomneedham
Copy link
Member

what is the default unless specified @VicDeo ? did this change recently? we should keep the same behaviour - but we have some instances that want to be able to control this to stop expensive searches from happening.

@PVince81
Copy link
Contributor Author

PVince81 commented Apr 9, 2018

The default is 4 now. Still, I think we should let the frontend send a request to the server even for a single char. (this is especially important for chinese names that usually have 2 to 3 characters)

Then the backend can still do exact matches for these but restrict partial matches for minimum chars.
The fix is only about making the frontend have 1 char minimum and check that it actually works as intended.

@VicDeo
Copy link
Member

VicDeo commented Apr 9, 2018

@tomneedham default value is 4. Autocompletion started after the first character before this option was introduced.

@tomneedham
Copy link
Member

As per chat I recommend:

  • UI always sends request.
  • Default min is 2
  • Configurable to whatever as admins require

Why:

  • This keeps at least most of the current behaviour.
  • Admins that know / want to change this can do
  • UI is able to work with low values

@PVince81
Copy link
Contributor Author

@VicDeo so remove the option usage from the different UI parts and make it start at one character again. Let the backend enforce the limit.

@PVince81 PVince81 assigned PVince81 and unassigned VicDeo Apr 10, 2018
@PVince81
Copy link
Contributor Author

PR here: #31067

@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p1-urgent Critical issue, need to consider hotfix with just that issue regression Type:Bug
Projects
None yet
Development

No branches or pull requests

4 participants