nextcloud / nextcloud/server

[Bug]: username autocompletion option breaks statuses api

Open
#34,570 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 25-feedback bug feature: sharing feature: status
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
  1. enable "allow username autocompletion to users within same group"
  2. try to get user statuses from /ocs/v2.php/apps/user_status/api/v1/statuses (fails)
  3. disable "allow username autocompletion to users within same group"
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.