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

ownCloud 8.1.x / 8.2.x aren't displaying group assignment when groupname contains numbers only #20303

Closed
ajeoc opened this issue Nov 4, 2015 · 15 comments · Fixed by #20348
Closed

Comments

@ajeoc
Copy link

ajeoc commented Nov 4, 2015

After upgrading to 8.1.4 the (most) entries for the Field "Groups" under Users losing the values

See also:
https://forum.owncloud.org/viewtopic.php?f=31&t=30577&p=97241&hilit=groups+empty#p97241
https://sendvid.com/ojuo31cw

Steps to reproduce

  1. Upgrade any 8.0.x to any 8.1.x version
  2. Login as admin and go to "Users" view
  3. After loading the page the Groups field loses the entries in a second!

Expected behaviour

The field "Groups" should display entries as before the upgrade.

Actual behaviour

The field "Groups" is showing no entries anymore.

Server configuration

Operating system: CentOS 7.1

**Web server: Apache 2.4.6

**Database: MariaDB 5.5.44

**PHP version: 5.4.16

ownCloud version: 8.1.4

**Updated from an older ownCloud or fresh install: yum update owncloud from 8.0.9

List of activated apps:

Enabled:

  • activity: 2.0.2
  • files: 1.1.10
  • files_locking:
  • files_pdfviewer: 0.7
  • files_sharing: 0.6.3
  • files_texteditor: 0.4
  • files_trashbin: 0.6.3
  • files_versions: 1.0.6
  • files_videoviewer: 0.1.3
  • provisioning_api: 0.2
  • templateeditor: 0.1
    Disabled:
  • encryption
  • external
  • files_external
  • firstrunwizard
  • gallery
  • user_external
  • user_ldap
  • user_webdavauth

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => 'ocnibw9w9uqp',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '172.16.0.202',
    2 => 'xxx',
  ),
  'datadirectory' => '/home/share/data',
  'overwrite.cli.url' => 'http://localhost/owncloud',
  'dbtype' => 'mysql',
  'version' => '8.1.4.2',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_admin',
  'dbpassword' => 'xxx',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'xxx',
  'mail_domain' => 'xxx',
  'mail_smtphost' => '192.168.200.14',
  'mail_smtpport' => '25',
  'forcessl' => false,
  'forceSSLforSubdomains' => false,
  'loglevel' => 0,
  'default_language' => 'en',
  'allow_user_to_change_display_name' => false,
  'updatechecker' => true,
  'check_for_working_htaccess' => true,
  'logtimezone' => 'Europe/Zurich',
  'maintenance' => false,
  'theme' => '',
);

Are you using external storage, if yes which one: NO

Are you using encryption: NO

Are you using an external user-backend, if yes which one: NO

Client configuration

Browser:

Operating system:

Logs

Web server error log

ownCloud log (data/owncloud.log)

Debug   files_locking   INFO: Incrementing lock type 1 count for /home/share/data/testuser/avatar.jpg   2015-11-04T15:31:28+01:00
Debug   files_locking   INFO: Incrementing lock type 1 count for /home/share/data/testuser/avatar.jpg   2015-11-04T15:31:28+01:00
Debug   files_locking   PASS: Acquired read lock for /home/share/data/testuser/avatar.jpg   2015-11-04T15:31:28+01:00
Debug   files_locking   INFO: Read lock requested for /home/share/data/testuser/avatar.jpg  2015-11-04T15:31:28+01:00
Debug   files_locking   INFO: Incrementing lock type 1 count for /home/share/data/941.admin/avatar.png  2015-11-04T15:31:28+01:00
Debug   files_locking   INFO: Incrementing lock type 1 count for /home/share/data/941.admin/avatar.png  2015-11-04T15:31:28+01:00
Debug   files_locking   PASS: Acquired read lock for /home/share/data/941.admin/avatar.png  2015-11-04T15:31:28+01:00
Debug   files_locking   INFO: Read lock requested for /home/share/data/941.admin/avatar.png 2015-11-04T15:31:28+01:00
Debug   files_locking   INFO: Incrementing lock type 1 count for /home/share/data/testuser/avatar.jpg   2015-11-04T15:31:27+01:00
Debug   files_locking   INFO: Incrementing lock type 1 count for /home/share/data/testuser/avatar.jpg   2015-11-04T15:31:27+01:00
Debug   files_locking   PASS: Acquired read lock for /home/share/data/testuser/avatar.jpg   2015-11-04T15:31:27+01:00
Debug   files_locking   INFO: Read lock requested for /home/share/data/testuser/avatar.jpg  2015-11-04T15:31:27+01:00
Debug   files_locking   INFO: Incrementing lock type 1 count for /home/share/data/941.admin/avatar.png  2015-11-04T15:31:27+01:00
Debug   files_locking   INFO: Incrementing lock type 1 count for /home/share/data/941.admin/avatar.png  2015-11-04T15:31:27+01:00
Debug   files_locking   PASS: Acquired read lock for /home/share/data/941.admin/avatar.png  2015-11-04T15:31:27+01:00
Debug   files_locking   INFO: Read lock requested for /home/share/data/941.admin/avatar.png 2015-11-04T15:31:27+01:00
Debug   DeleteOrphanedSharesJob 2 orphaned share(s) deleted 2015-11-04T15:30:01+01:00
Debug   files_locking   INFO: Incrementing lock type 1 count for /home/share/data/305.admin/avatar.jpg  2015-11-04T15:27:51+01:00
Debug   files_locking   INFO: Incrementing lock type 1 count for /home/share/data/305.admin/avatar.jpg  2015-11-04T15:27:51+01:00
Debug   files_locking   PASS: Acquired read lock for /home/share/data/305.admin/avatar.jpg  2015-11-04T15:27:51+01:00
Debug   files_locking   INFO: Read lock requested for /home/share/data/305.admin/avatar.jpg 2015-11-04T15:27:51+01:00
Debug   files_locking   INFO: Incrementing lock type 1 count for /home/share/data/305.admin/avatar.jpg  2015-11-04T15:27:49+01:00
Debug   files_locking   INFO: Incrementing lock type 1 count for /home/share/data/305.admin/avatar.jpg  2015-11-04T15:27:49+01:00
Debug   files_locking   PASS: Acquired read lock for /home/share/data/305.admin/avatar.jpg  2015-11-04T15:27:49+01:00
Debug   files_locking   INFO: Read lock requested for /home/share/data/305.admin/avatar.jpg 2015-11-04T15:27:49+01:00
Debug   core    starting upgrade from 8.0.9.2 to 8.1.4.2    2015-11-04T15:26:28+01:00
Fatal   index   Exception: {"Exception":"OC\\NeedsUpdateException","Message":"","Code":0,"Trace":"#0 \/var\/www\/html\/owncloud\/lib\/private\/app.php(98): OC_App::loadApp('files')\n#1 \/var\/www\/html\/owncloud\/lib\/private\/util.php(127): OC_App::loadApps(Array)\n#2 \/var\/www\/html\/owncloud\/lib\/base.php(873): OC_Util::setupFS()\n#3 \/var\/www\/html\/owncloud\/index.php(48): OC::handleRequest()\n#4 {main}","File":"\/var\/www\/html\/owncloud\/lib\/private\/app.php","Line":118}  2015-11-04T15:26:05+01:00
Debug   lock    FREE: Released locks on /home/share/data/testuser/avatar.jpg    2015-11-04T15:22:23+01:00
Debug   lock    INFO: Released lock handle Resource id #391 on /home/share/data/testuser/avatar.jpg 2015-11-04T15:22:23+01:00
Debug   lock    INFO: Releasing locks on /home/share/data/testuser/avatar.jpg   2015-11-04T15:22:23+01:00
Debug   lock    INFO: Incrementing lock type 1 count for /home/share/data/testuser/avatar.jpg   2015-11-04T15:22:23+01:00
Debug   lock    PASS: Acquired read lock for /home/share/data/testuser/avatar.jpg   2015-11-04T15:22:23+01:00
Debug   lock    INFO: Read lock requested for /home/share/data/testuser/avatar.jpg  2015-11-04T15:22:23+01:00
Debug   lock    FREE: Released locks on /home/share/data/testuser/avatar.jpg    2015-11-04T15:22:22+01:00
Debug   lock    INFO: Released lock handle Resource id #391 on /home/share/data/testuser/avatar.jpg 2015-11-04T15:22:22+01:00
Debug   lock    INFO: Releasing locks on /home/share/data/testuser/avatar.jpg   2015-11-04T15:22:22+01:00
Debug   lock    INFO: Incrementing lock type 1 count for /home/share/data/testuser/avatar.jpg   2015-11-04T15:22:22+01:00
Debug   lock    PASS: Acquired read lock for /home/share/data/testuser/avatar.jpg   2015-11-04T15:22:22+01:00
Debug   lock    INFO: Read lock requested for /home/share/data/testuser/avatar.jpg  2015-11-04T15:22:22+01:00
Debug   lock    FREE: Released locks on /home/share/data/941.admin/avatar.png   2015-11-04T15:22:22+01:00
Debug   lock    INFO: Released lock handle Resource id #391 on /home/share/data/941.admin/avatar.png    2015-11-04T15:22:22+01:00
Debug   lock    INFO: Releasing locks on /home/share/data/941.admin/avatar.png  2015-11-04T15:22:22+01:00
Debug   lock    INFO: Incrementing lock type 1 count for /home/share/data/941.admin/avatar.png  2015-11-04T15:22:22+01:00
Debug   lock    PASS: Acquired read lock for /home/share/data/941.admin/avatar.png  2015-11-04T15:22:22+01:00
Debug   lock    INFO: Read lock requested for /home/share/data/941.admin/avatar.png 2015-11-04T15:22:22+01:00
Debug   lock    FREE: Released locks on /home/share/data/941.admin/avatar.png   2015-11-04T15:22:22+01:00
Debug   lock    INFO: Released lock handle Resource id #391 on /home/share/data/941.admin/avatar.png    2015-11-04T15:22:22+01:00
Debug   lock    INFO: Releasing locks on /home/share/data/941.admin/avatar.png  2015-11-04T15:22:22+01:00
Debug   lock    INFO: Incrementing lock type 1 count for /home/share/data/941.admin/avatar.png  2015-11-04T15:22:22+01:00
Debug   lock    PASS: Acquired read lock for /home/share/data/941.admin/avatar.png  2015-11-04T15:22:22+01:00
Debug   lock    INFO: Read lock requested for /home/share/data/941.admin/avatar.png 2015-11-04T15:22:22+01:00
Debug   lock    FREE: Released locks on /home/share/data/305.admin/avatar.jpg   2015-11-04T15:22:20+01:00
Debug   lock    INFO: Released lock handle Resource id #391 on /home/share/data/305.admin/avatar.jpg    2015-11-04T15:22:20+01:00
Debug   lock    INFO: Releasing locks on /home/share/data/305.admin/avatar.jpg  2015-11-04T15:22:20+01:00
Debug   lock    INFO: Incrementing lock type 1 count for /home/share/data/305.admin/avatar.jpg  2015-11-04T15:22:20+01:00
Debug   lock    PASS: Acquired read lock for /home/share/data/305.admin/avatar.jpg  2015-11-04T15:22:20+01:00
Debug   lock    INFO: Read lock requested for /home/share/data/305.admin/avatar.jpg 2015-11-04T15:22:20+01:00
Debug   lock    FREE: Released locks on /home/share/data/305.admin/avatar.jpg   2015-11-04T15:22:19+01:00
Debug   lock    INFO: Released lock handle Resource id #391 on /home/share/data/305.admin/avatar.jpg    2015-11-04T15:22:19+01:00
Debug   lock    INFO: Releasing locks on /home/share/data/305.admin/avatar.jpg  2015-11-04T15:22:19+01:00
Debug   lock    INFO: Incrementing lock type 1 count for /home/share/data/305.admin/avatar.jpg  2015-11-04T15:22:19+01:00
Debug   lock    PASS: Acquired read lock for /home/share/data/305.admin/avatar.jpg  2015-11-04T15:22:19+01:00
Debug   lock    INFO: Read lock requested for /home/share/data/305.admin/avatar.jpg 2015-11-04T15:22:19+01:00
Debug   core    starting upgrade from 8.0.8.0 to 8.0.9.2    2015-11-04T15:16:10+01:00

Browser log

@nickvergessen
Copy link
Contributor

In how many groups are the users? I see some users still display one group name? does it only happen to users with multiple groups?

@ajeoc
Copy link
Author

ajeoc commented Nov 5, 2015

All users are in one gorup.
If I create a new user with:

  1. username: "111.admin" group: "111" --> Group field is empty. If I then go and set the group for this user manually to group "111" and reload the browser page it displays "no group".
  2. username: "1pro.admin" group: "1pro" --> Group field displays correct ("1pro")
    If I check the DB table "oc_group_user" gid and uid displaying correct.
    It looks like it has to do with numbers and letters used as gorup names.
    Feel free to ask me to test anything which could be helpful to understand the issue.

@ajeoc
Copy link
Author

ajeoc commented Nov 5, 2015

Same behaviour on 8.2.0 ! Test it out : https://demo.owncloud.org/
Now, I would say ownCloud 8.1.x / 8.2.x aren't displaying group assignment when groupname contains numbers only in Users-view!

@ajeoc ajeoc changed the title Groups field empty after upgrade from 8.0.x to 8.1.x ownCloud 8.1.x / 8.2.x aren't displaying group assignment when groupname containins numbers only in Users-view Nov 5, 2015
@ajeoc ajeoc changed the title ownCloud 8.1.x / 8.2.x aren't displaying group assignment when groupname containins numbers only in Users-view ownCloud 8.1.x / 8.2.x aren't displaying group assignment when groupname containins numbers only Nov 5, 2015
@ajeoc ajeoc changed the title ownCloud 8.1.x / 8.2.x aren't displaying group assignment when groupname containins numbers only ownCloud 8.1.x / 8.2.x aren't displaying group assignment when groupname contains numbers only Nov 5, 2015
@nickvergessen
Copy link
Contributor

right, with only numbers I can see it now

@nickvergessen
Copy link
Contributor

also happens on master

@nickvergessen
Copy link
Contributor

@PVince81 what we talked about at lunch

@PVince81
Copy link
Contributor

PVince81 commented Nov 5, 2015

If it worked in 8.0, this can be bisected (I can do it if you want)

@ajeoc
Copy link
Author

ajeoc commented Nov 5, 2015

I can confirm it worked in 8.0.4 / 8.0.8 / 8.0.9 , the versions I worked with.

@PVince81
Copy link
Contributor

PVince81 commented Nov 5, 2015

Thanks for the info, tagging as regression.

So if I understand well you cannot properly manage groups because they are not shown?

@nickvergessen
Copy link
Contributor

They are not listed in the mutliselect placeholder, but when you click it, they are listed and unchecked

@PVince81
Copy link
Contributor

PVince81 commented Nov 6, 2015

Confirmed working on stable8, broken on stable8.1.
I'll bisect between these two versions.

@PVince81
Copy link
Contributor

PVince81 commented Nov 6, 2015

Breaking commit: 409453b

@PVince81
Copy link
Contributor

PVince81 commented Nov 6, 2015

CC @icewind1991

@nickvergessen I see it uses array_keys, probably what we were talking about yesterday ?

@PVince81
Copy link
Contributor

PVince81 commented Nov 6, 2015

Basically, array_keys seems to automatically convert string values to integer... Or the values were already integers inside that array due to a previous conversion.

I see that even before this commit there was a code path (the cache) that was using array_keys too.

@PVince81
Copy link
Contributor

PVince81 commented Nov 6, 2015

Looks like it makes it very cumbersome to use the GUI and impossible to properly manage groups in such cases.

@PVince81 PVince81 added this to the 8.2.1-current-maintenance milestone Nov 6, 2015
@MorrisJobke MorrisJobke modified the milestones: 9.0-current, 8.2.1-current-maintenance Nov 6, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants