Skip to content

Username normalization in owncloud beta (2.5.1-beta 1) prevents login with ldap user #2030

Closed

Description

@jensd0e

Actual behaviour

  • Username is altered (or normalized) automatically after first login. Space is changed to underscore.

Expected behaviour

-Username should not be altered.

Steps to reproduce

  1. Install owncloud latest beta. (Hint: Same behavior with latest nextcloud dev-version)
  2. Login with username containing a space. [Here authentication is done against LDAP server]. First login works, but app (almost) instantly redirects back to login screen, where you have to login again. But:
  3. Username is changed from 'Firstname Lastname' to 'Firstname_Lastname' and the username field can't be modified, so the username can't be changed and the user can't authenticate against LDAP server. User is locked out and has to reinstall app.

Note

Username is not changed with latest ownCloud stable (2.4.0) (or latest nextcloud).

Workaround

[Only works in nextcloud-dev:] Also configure to login with Email-Account as login attribute in LDAP. Username is changed as described above in app, but login is done with Email-Address.
Update: After some time, nextcloud decided to change my username from username@[email protected] to [email protected].
Conclusion: Some recent change in the owncloud and nextcloud app changes the login account to the username in owncloud. But this is not necessarily my login username.
Now it seems, that oc and nextcloud share a recent code change. All the time, I wished that both Teams work together to fix the instant upload issue. Now I wish, that they did not work together. :-)

Environment data

Android version: 7.0
Device model: Samsung Galaxy S7
Stock or customized system: Stock
ownCloud app version: 2.5.0 beta 2
ownCloud server version: 9.1.6

Activity

  1. jesmrec commented on Sep 12, 2017

    @jesmrec
    Member

    This is like the regression we found in the tasks of 2.5.0 official version. We will study it. Thanks for reporting!!!!!

  2. jensd0e commented on Nov 22, 2017

    @jensd0e
    Author

    Today I was redirected to login page over and over again, like described above. This is version 2.5.1-beta.1
    Is this supposed to be fixed in 2.5.1-beta.1?
    After uninstalling and reinstalling, app crashed permanently. Fixed this by clearing app data and cache. After entering server and credentials, it did not happen again (rebooted to be sure).

  3. jesmrec commented on Nov 22, 2017

    @jesmrec
    Member

    after clearing, is the problem fixed?

  4. jensd0e commented on Nov 22, 2017

    @jensd0e
    Author

    No. Problem persists: I'm logged in and after one or two seconds, I'm back at the logon screen. As far as my LDAP-Server is concerned, logon is successful.

    Since a restart seem not to be enough to trigger this, there seems to be some "time-dependent-token" involved. I just reinstalled and cleared data & cache to get it working again. Clearing data & cache doesn't work. I need to uninstall the app. Working again.

    Edit: Honestly, I don't know why, but I got this link in my mailbox.

  5. jesmrec commented on Nov 22, 2017

    @jesmrec
    Member

    it would be helpful a test account in your server to try to reproduce the problem. Would it be posible? in this case, you can ship test credentials to [email protected]

    Regarding your mail, the link you posted comes from a different company's product.

  6. changed the title [-]Username normalization in owncloud beta (2.5.0-beta 2) prevents login with ldap user[/-] [+]Username normalization in owncloud beta (2.5.1-beta 1) prevents login with ldap user[/+] on Nov 22, 2017
  7. jensd0e commented on Nov 22, 2017

    @jensd0e
    Author

    Tomorrow I can send you credentials. But there are no login failures, so that might not be helpful at all.

    Regarding the link: the solution mentioned there is surely no fix for this problem? I don't know what Tobias is talking about, but it might be worth to look at the problem/solution.

    Right now it works as supposed and I can't manage to break it. 😁

  8. tobiasKaminsky commented on Nov 23, 2017

    @tobiasKaminsky
    Contributor

    I did not wanted to highjack this thread, but since you mentioned me.
    Your problem with whitespaces in username is solved in nc app, as you said in your "update" in the first comment. However there was still a little bug where such users with whitespaces could not set/unset a file as favorite, so I mentioned you in this fix, to let you know that now everything will work (in nc app).

  9. jesmrec commented on Nov 23, 2017

    @jesmrec
    Member

    i will check all the stuff again. thanks all.

    CC @davigonz

  10. jensd0e commented on Nov 23, 2017

    @jensd0e
    Author

    Ok. OC is redirecting me again. Credentials send.

    @jesmrec: Thanks a lot!
    @tobiasKaminsky: Thanks for your explanation. Since login seems to be fine (checked the server logs), I don't think that a whitespace in my username is the root cause for my problem. But hey, I'm just a user here...

  11. jesmrec commented on Nov 23, 2017

    @jesmrec
    Member

    first of all, thanks for the test account @jensd0e.

    Some thoughts:

    • Checking your account, i could not reproduce the problem. After logging, i was never redirected to login view when i perform some different actions in the account. In any case, Android app is ready to handle with blanks in the user field, as the server does.

    • About editing the username: our policy always was that a different username means a different account. In any case, i do not understand why you said that changing the username makes you to reinstall the app. You can not change the username, but you can re-attach the account without reinstalling.

  12. jensd0e commented on Nov 23, 2017

    @jensd0e
    Author

    @jesmrec: Since installing ownCloud today (about 7 hours ago), it didn't "break" ("break": eternally redirecting me to logon screen). Yesterday it worked from afternoon (fresh install) until today in the morning. It "broke" somewhere in between.

    I don't think my current problem has anything to do with my username having a white-space in it. It seems I have hijacked this thread (I started) for this new problem. :-(

    About changing my username: that was just as a workaround for the problem, described in the OP. I'm using my initial username for weeks. As another test, I also installed ownCloud 2.5.0 - just to see, if my problem originates from my phone, since with version 2.5.0 I never had the redirecting error.

  13. jesmrec commented on Nov 23, 2017

    @jesmrec
    Member

    ok... so we will have more patience to catch what is that breaks. i keep on checking your account.

  14. jensd0e commented on Nov 23, 2017

    @jensd0e
    Author

    Ok, It's broken again: ownCloud (2.5.1-beta.1) always redirects me to login page. After entering my (valid) credentials, I see my root folder for a short time (time is varying each time) before I'm send back to login screen.

    Are there any log-files, I can pull off the phone? And if so, where are they stored?

    OwnCloud 2.5.0 is still working.

  15. jesmrec commented on Nov 23, 2017

    @jesmrec
    Member

    you can find logs in settings view, in case of the beta.

  16. 6 remaining items

  17. jensd0e commented on Dec 1, 2017

    @jensd0e
    Author

    Seems to be stuck somewhere. I just send the logfile again. Please contact me, if no E-Mail arrives.

  18. jesmrec commented on Dec 1, 2017

    @jesmrec
    Member

    mail received!

  19. pjao commented on Dec 17, 2017

    @pjao

    @jesmrec Same problem here, from a fresh install debian9 and owncloud 10.0.4.4, when using ownCloudBeta-android/2.5.1-beta.1 always redirects me to login page.

    After entering my (valid) credentials, I see my root folder for a short time before I'm send back to login screen.

    With ownCloud-android/2.5.0 no problem at all. Windows or web interface, also without problems.

  20. added this to the milestone on Jan 3, 2018
  21. self-assigned this
    on Jan 3, 2018
  22. modified the milestones: 2.6.0, 2.7.0 on Jan 16, 2018
  23. davigonz commented on Jan 16, 2018

    @davigonz
    Contributor

    Still trying to reproduce it, it will not be included in 2.6.0 release, moving it...

  24. modified the milestones: 2.6.0, on Jan 16, 2018
  25. davigonz commented on Jan 26, 2018

    @davigonz
    Contributor

    @jensd0e , @pjao , please follow up #1964 where we are talking about the login redirection in beta app.

    I will keep this issue opened to fix the problem described in the first comment, not the login redirection one.

  26. davigonz commented on Jul 26, 2018

    @davigonz
    Contributor

    We deprecated the beta app described in this issue and the solution proposed here is no longer needed, so this shouldn't happen again with the new beta version.

    I will close this, if you want to know how to join our new betas, please have a look at the end of our readme file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions