Skip to content

cannot add user to group called "0" by using provisioning API #29990

Closed

Description

@individual-it

Steps to reproduce

  1. create a group called "0" (by now that should work by any means)
  2. add a user to that group using the provisioning API. e.g. curl -u admin:admin http://localhost/owncloud-core/ocs/v2.php/cloud/users/admin/groups -d groupid="0"

Expected behaviour

user should be added to that group

Actual behaviour

error 400 is returned

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failure</status>
  <statuscode>400</statuscode>
  <message/>
 </meta>
 <data/>
</ocs>

Server configuration

Operating system:
Ubuntu 17.10
Web server:
Apache2
Database:
SQlite
PHP version:
7.1
ownCloud version: (see ownCloud admin page)
10.0.4
Updated from an older ownCloud or fresh install:
fresh
Where did you install ownCloud from:
git

The content of config/config.php:

{
    "system": {
        "instanceid": "ocjvys04zaqc",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.0.111"
        ],
        "datadirectory": "\/home\/JankariTech\/www\/html\/owncloud-core\/data",
        "overwrite.cli.url": "http:\/\/192.168.0.111\/owncloud-core",
        "dbtype": "sqlite3",
        "version": "10.0.4.4",
        "logtimezone": "UTC",
        "installed": true,
        "default_language": "en"
    }
}

List of activated apps:

Enabled:
  - comments: 0.3.0
  - dav: 0.3.2
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.1
  - files_sharing: 0.10.1
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - testing: 0.1.0
  - updatenotification: 0.2.1
Disabled:
  - theme-example

Are you using external storage, if yes which one: local/smb/sftp/...
local
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Logs

Web server error log

nothing

ownCloud log (data/owncloud.log)

nothing

Activity

  1. phil-davis commented on Dec 29, 2017

    @phil-davis
    Contributor

    @individual-it do you already have a test scenario/step demonstrating this bug?
    If not, I am happy to have a look - since I seem to be the empty guru :)

  2. tomneedham commented on Dec 29, 2017

    @tomneedham
    Contributor

    I know we also stopped allowing usernames < 3 chars - is it the same with groups?

  3. phil-davis commented on Dec 29, 2017

    @phil-davis
    Contributor

    Groups can be single-char. Group 0 can be added OK (via UI or API) and you can add users to group 0 using the webUI or occ group:add-member -m uid 0

  4. individual-it commented on Dec 29, 2017

    @individual-it
    MemberAuthor

    no there is no test for that yet. We stumble over it while doing UI tests, the UI stuff itself works fine but the setup does not. So it should be tested in the API tests

  5. self-assigned this
    on Dec 29, 2017
  6. phil-davis commented on Dec 29, 2017

    @phil-davis
    Contributor

    Yep, found it in the provisioning-v1/v2 API tests and it is easy to make failing tests. Tests and fix coming...

  7. phil-davis commented on Dec 29, 2017

    @phil-davis
    Contributor

    Additional bug: attempts to remove a user from group 0 also fail in a similar way.

  8. phil-davis commented on Jan 2, 2018

    @phil-davis
    Contributor

    Fixed by PR #29994

  9. lock commented on Jul 31, 2019

    @lock

    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.

  10. locked as resolved and limited conversation to collaborators on Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions