-
Notifications
You must be signed in to change notification settings - Fork 48
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
Conversation
Signed-off-by: Maxence Lange <[email protected]>
/backport to stable22 |
There was a problem hiding this 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 🤷
@danxuliu this might be the answer you are looking for: nextcloud/contacts#2370 :) |
There was a problem hiding this 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.
This should also fix: nextcloud/ios#1666 |
fix #777