Skip to content

Cannot share files with old users #10817

Closed

Description

@tflidd

Steps to reproduce

  1. Install owncloud 3 (perhaps OC 4), create users, and make all updates to 7.0.2
  2. Alternatively: insert space in the field "displayname" in the users-table

Expected behaviour

Share files with all users giving their username.

Actual behaviour

If you click on the sharing symbol in the OC-interface, you can enter a name but old users (create in OC 3, maybe also in OC 4) won't appear. In the user-overview, these "old" users, there is no "Full Name". More recent users show their user name per default (when no specific name was set).

I checked the database and old users have a space character in the field "displayname". I didn't put there a space, either it was by default or it came with an update. It concerns all users create in previous versions. If I delete the Full Name in the owncloud-interface or set "displayname" in the database to NULL, sharing will work.

One small thing which might be related: For these old users, there is no capital letter in the thumbnail (user overview). When I add a full name, there is this capital letter. But I think in a previous version, these capital letters were shown for all users, which means the problem appeared with an update (probably version 7, maybe 6). I only did manual upgrades, keeping /config and /data-directory.

Server configuration

Operating system: Ubuntu trusty

Web server: Apache 2.4.7

Database: MySQL 5.5.38

PHP version: 5.5.9

ownCloud version: 7.0.2

Updated from an older ownCloud or fresh install: Continously update since OC 3.

List of activated apps: Core-Apps + News + Notes

The content of config/config.php:

$CONFIG = array (
'installed' => true,
'dbtype' => 'mysql',
'dbname' => 'cloud',
'dbuser' => 'cloud',
'dbpassword' => 'xxx',
'dbhost' => 'localhost',
'dbtableprefix' => '',
'forcessl' => true,
'blacklisted_files' =>
array (
0 => '.htaccess',
),
'trashbin_retention_obligation' => 30,
'allow_user_to_change_display_name' => true,
'updatechecker' => true,
'has_internet_connection' => true,
'enablebackup' => false,
'datadirectory' => '/var/www/owncloud/data',
'version' => '7.0.2.1',
'installedat' => '1325006970.14',
'lastupdatedat' => '1329928732.51',
'loglevel' => '0',
'logdateformat' => 'F d, Y H:i:s',
'instanceid' => 'xxx',
'maintenance' => false,
'theme' => '',
'trusted_domains' =>
array (
0 => 'my.domain.example',
1 => 'my.domain2.example',
),
'appcodechecker' => false,
'appstoreenabled' => false,
'asset-pipeline.enabled' => false,
'overwritewebroot'=>'/owncloud',
);

(the last 4 lines were added in OC 7)

Are you using external storage, if yes which one: None.

Are you using encryption: yes

Client configuration

**Browser:**Firefox/Chrome

**Operating system:**Win7

Logs

There are no specific logs.

I startet also a discussion on the forum: https://forum.owncloud.org/viewtopic.php?f=29&t=23437

Activity

  1. karlitschek commented on Sep 2, 2014

    @karlitschek
    Contributor

    @schiesbn

  2. PVince81 commented on Sep 2, 2014

    @PVince81
    Contributor

    @tflidd when you say "insert a space", do you mean that the full name itself is ONLY a space or do you mean the name has a space at the beginning, like " test" ?

  3. tflidd commented on Sep 2, 2014

    @tflidd
    ContributorAuthor

    It is only a SPACE like " ". The sql-dump is for example:

    INSERT INTO users (uid, password, displayname)('test', '$2a$04$hash-value', ' ')

  4. added this to the milestone on Sep 3, 2014
  5. tflidd commented on Sep 12, 2014

    @tflidd
    ContributorAuthor

    I checked on an old database-backup from OC 6.0.3, there already was a space in the displayname for these old users. Unfortunately, I have no older backups to verify.

  6. PVince81 commented on Oct 15, 2014

    @PVince81
    Contributor

    The share code should probably be updated to be tolerant of such values.
    Or... add a repair step during upgrade that will clear such values.

  7. schiessle commented on Oct 15, 2014

    @schiessle
    Contributor

    I have no idea how this happened. But try the pull request above, this should make getDisplayName() and setDisplayName() more robust and ignore white spaces.

  8. schiessle commented on Oct 16, 2014

    @schiessle
    Contributor

    will be released with OC7.0.3

  9. tflidd commented on Oct 17, 2014

    @tflidd
    ContributorAuthor

    Perfect. I just tested it on 7.0.3RC1 with the new version of user.php
    Thank you.

  10. modified the milestones: 7.0, on Mar 2, 2016
  11. lock commented on Aug 5, 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.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions