[Bug]: username autocompletion option breaks statuses api
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
Enabling the option "allow username autocompletion to users within same group" breaks the api to get user statuses via
/ocs/v2.php/apps/user_status/api/v1/statuses
When the option is enabled, the answer is just
<?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>200</statuscode>
<message>OK</message>
</meta>
<data/>
</ocs>
When the option is disabled, user statuses are returned.
This bug was found when trying to fix https://github.com/nextcloud/talk-android/issues/2478
Thanks to @andyxheli !
Steps to reproduce
- enable "allow username autocompletion to users within same group"
- try to get user statuses from
/ocs/v2.php/apps/user_status/api/v1/statuses(fails) - disable "allow username autocompletion to users within same group"
- try to get user statuses from
/ocs/v2.php/apps/user_status/api/v1/statuses(works)
Expected behavior
option "allow username autocompletion to users within same group" doesn't have any impact on user statuses api.
Installation method
No response
Operating system
No response
PHP engine version
No response
Web server
No response
Database engine version
No response
Is this bug present after an update or on a fresh install?
No response
Are you using the Nextcloud Server Encryption module?
No response
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
status app
...
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
reproduced with server versions
24.0.6
26.0.0 dev
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the /ocs/v2.php/apps/user_status/api/v1/statuses endpoint and the implementation of the “allow username autocompletion to users within same group” option. Reproduce the request with the option enabled and disabled; done means the endpoint returns user statuses in both cases without changing the option’s behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100