Skip to content

Username is Case Sensitive #3293

Closed
Closed

Description

@Ryushin

Running Debian 7.0 (Wheezy)
Package from: http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_6.0/

If a user logs in using the web interface and uses a different case for their username, and uploads a file, a new folder in the data directory is created along with the file being upload. When sharing a file link the file will not be found as it is not in the correct folder listed in the database..

A configuration option to force the username and the username in the data folder to be all lower case will prevent this from happening.

I order to correct this, I had to merge the users folders together to a lowercase folder. Changed the storage directory and username for each user to be lowercase in the database. Run TRUNCATE oc_filecache; to rebuild the file cache. Then educate each and every user to only log using a lowercase username.

Activity

  1. jancborchardt commented on May 10, 2013

    @jancborchardt
    Contributor

    Hm, shouldn’t the login mechanism just run .toLower() on the username every time? You won’t get users educated about using only a specific form of their username, the damn backend just has to account for this.

    Also, I thought this was already the case.

    cc @karlitschek @LukasReschke

  2. MTGap commented on May 10, 2013

    @MTGap
    Contributor

    We had bugs with this in the past. It was resolved, but I'll investigate.

    @Ryushin what user backend are you using?

  3. Ryushin commented on May 10, 2013

    @Ryushin
    Author

    Users are authenticating locally to ownclouds mysql database. They are not using unix auth, ldap, or active directory. I very much like having virtual users in owncloud. Keeps security tighter for me.

  4. karlitschek commented on May 10, 2013

    @karlitschek
    Contributor

    @jancborchardt The devil is in the details here. The username is used in all kind of places like filesystem, other user backends and APIs. So we have to be careful here.

  5. MTGap commented on May 12, 2013

    @MTGap
    Contributor

    I can't reproduce with the steps you provided.

    In lib/user.php log the value of $uid on line 250 and see what case the username is when you login.

  6. jancborchardt commented on Jul 25, 2013

    @jancborchardt
    Contributor

    What’s the resolution on this one? Do we fix it? cc @DeepDiver1975 @bantu

  7. VicDeo commented on Jul 25, 2013

    @VicDeo
    Contributor

    @jancborchardt I linked it from the related PR. Needs to be retested once it is merged

  8. VicDeo commented on Nov 30, 2013

    @VicDeo
    Contributor

    duplicate of #1314

  9. locked as resolved and limited conversation to collaborators on Aug 19, 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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions