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

verify shareType in params #781

Merged
merged 1 commit into from
Aug 11, 2021
Merged

Conversation

ArtificialOwl
Copy link
Member

fix #777

Signed-off-by: Maxence Lange <[email protected]>
@ArtificialOwl
Copy link
Member Author

/backport to stable22

Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know why checking shareType is needed nor why an empty shareType means that the search is not done from the frontend, but given that the autocomplete endpoint uses shareTypes instead, would it make sense to check shareType and, if it is empty, then check shareTypes too? Something like (quick example, NOT tested):

$shareType = $this->getArray('shareType', $params) ?? $this->getArray('shareTypes', $params);

Otherwise a search made from Talk UI, which uses the autocomplete endpoint, would have an empty shareType, which will cause fromFrontEnd to be set to false even if the request came from the frontend (assuming that frontend here means Web UI, which I do not really know). On the other hand... I do not know either if checking shareTypes could cause any non-frontend request to be seen as frontend requests 🤷

@ArtificialOwl
Copy link
Member Author

@danxuliu this might be the answer you are looking for: nextcloud/contacts#2370 :)

Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can verify that this fixes #777 (and nextcloud/deck#3241) for me.

@solracsf
Copy link
Member

This should also fix:

nextcloud/ios#1666
nextcloud/deck#3241
nextcloud/server#28412

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

Successfully merging this pull request may close these issues.

"an error occurred while performing the search"
4 participants