Skip to content

ownCloud {core} Login failed: '[email protected]' (Remote IP: 'x.x.x.x') #28234

Closed

Description

@brianjmurrell

Steps to reproduce

  1. Unknown

Expected behaviour

I shouldn't get sporadic login errors

Actual behaviour

I get sporadic login errors of the form:

ownCloud {core} Login failed: '[email protected]' (Remote IP: 'x.x.x.x')

Note however that these are only sporadic and that generally, from the client that makes Owncloud produce the above errors, everything works, so the client is configured correctly.

I have also logged the password being given to checkPassword() when this is logged and it is correct.

Server configuration

Operating system:
CentOS Linux 7.completely.up.to.date

Web server:
Apache

Database:
MySQL

PHP version:
5.4.16

ownCloud version: (see ownCloud admin page)
9.1.5

Updated from an older ownCloud or fresh install:
Updated

Where did you install ownCloud from:
EPEL

Signing status (ownCloud 9.0 and above):

Integrity checker has been disabled. Integrity cannot be verified.

The content of config/config.php:

Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

Produced an empty file

List of activated apps:
Contacts
Calendar

Are you using external storage, if yes which one: local/smb/sftp/...
No

Are you using encryption: yes/no
No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No

Client configuration

Browser:
N/A
Using Davdroid

Operating system:
Android

Logs

Web server error log

It's empty

ownCloud log (data/owncloud.log)

Only contains the above error string

Browser log

N/A

Activity

  1. PVince81 commented on Jun 29, 2017

    @PVince81
    Contributor

    Which client is causing this ? Only davdroid or any client ?

  2. brianjmurrell commented on Jun 29, 2017

    @brianjmurrell
    Author

    I can't really say for sure. Given the nature of the debugging that I have done, I would say that any client could trigger the bug, but since I only use davdroid, that's all I can confirm for sure.

  3. added this to the triage milestone on Jun 30, 2017
  4. karakayasemi commented on Jul 4, 2017

    @karakayasemi
    Contributor

    By default, owncloud does not allow login with e-mail, If a user try to login with e-mail, loginController firstly trying to login by using email as username and giving this error. The LoginController tries to get the username with the getByEmail function after the first unsuccessful attempt. If function returns a user it tries second login attempts with username and password.
    IMHO, these logs are created by the first login attempt with email.

  5. brianjmurrell commented on Jul 4, 2017

    @brianjmurrell
    Author

    I have changed my DavDroid configuration to use the bare username (i.e. LHS of my e-mail address). We'll see if these errors go away now.

  6. karakayasemi commented on Jul 4, 2017

    @karakayasemi
    Contributor

    If you use username probably it will disappear. But maybe still we need to refactor auth logic. We are logging two times when failed login attempts with e-mail. One of them for only e-mail, other is for the username. Every time even successful login attempts, when a user used email in login, we are logging one time failed login attempt. For example, followings are logs for only one unsuccessful attempt with email, first one for email, other one is for username:

    {"reqId":"u3JkCI4HpYFVNxN0sreu","level":2,"time":"2017-07-04T12:43:18+00:00","remoteAddr":"192.168.157.1","user":"--","app":"core","method":"POST","url":"/core/index.php/login","message":"Login failed: '[email protected]' (Remote IP: '192.168.157.1')"}
    {"reqId":"u3JkCI4HpYFVNxN0sreu","level":2,"time":"2017-07-04T12:43:19+00:00","remoteAddr":"192.168.157.1","user":"--","app":"core","method":"POST","url":"/core/index.php/login","message":"Login failed: 'ocadmin' (Remote IP: '192.168.157.1')"}

  7. karakayasemi commented on Jul 6, 2017

    @karakayasemi
    Contributor

    @brianjmurrell any update?

  8. brianjmurrell commented on Jul 7, 2017

    @brianjmurrell
    Author

    Seems like that might have made the problem go away.

    Any reason to not just s/@.*$// from login names?

  9. karakayasemi commented on Jul 7, 2017

    @karakayasemi
    Contributor

    No problem with the characters. The only problem occurs when login username matches with any user's email address.

  10. brianjmurrell commented on Jul 7, 2017

    @brianjmurrell
    Author

    Ahhh. Reading back, I see what you are saying...

    If a user try to login with e-mail, loginController firstly trying to login by using email as username and giving this error. The LoginController tries to get the username with the getByEmail function after the first unsuccessful attempt. If function returns a user it tries second login attempts with username and password.

    So when the login string matches the pattern /.+@.+\..+$/ why not skip the first login attempt and jump directly to trying to find the user by e-mail address?

    You could probably even refine the RE to be more strict about matching legal domain names on the RHS of the @.

  11. karakayasemi commented on Jul 7, 2017

    @karakayasemi
    Contributor

    I am willing to refactor loginController if we plan such things.

  12. karakayasemi commented on Jul 10, 2017

    @karakayasemi
    Contributor

    Somehow we need to try only one login attempt to prevent unnecessary failed login log.
    Maybe first we can check is user input a valid email. If it is we can try to call getByEmail function. If its output count greater than 0, we can try just login with email address user. If these conditions are not met, we can just try to login with original user input

  13. individual-it commented on Jul 11, 2017

    @individual-it
    Member

    the username itself can look like an email address but in that case the user name login must be performed

  14. karakayasemi commented on Jul 11, 2017

    @karakayasemi
    Contributor

    It does not create any problem unless if a user's uid is the same as another user's email. We will try email login if only getByEmail function output count greater than 0.

  15. 30 remaining items

  16. djgrubson commented on Jun 26, 2018

    @djgrubson

    same problem here we cannot login in to GUI at all
    {"reqId":"cuffTIUiLGzN3QYKJGqr","level":2,"time":"2018-06-26T22:51:05+00:00","remoteAddr":"x.x.x.x","user":"chris","app":"core","method":"GET","url":"\/apps\/files\/","message":"Login failed: 'owncloud' (Remote IP: 'xx.xx.xx.xx')"} {"reqId":"cuffTIUiLGzN3QYKJGqr","level":2,"time":"2018-06-26T22:51:06+00:00","remoteAddr":"xx,xx,xx,xx,","user":"--","app":"core","method":"GET","url":"\/apps\/files\/","message":"Login failed: 'owncloud' (Remote IP: 'xx.xx.xx.xx)"}
    is there an update or fix for this problem it stopping us from using owncloud?

    my vers is 10.0.8-1+1.1

  17. PVince81 commented on Jun 27, 2018

    @PVince81
    Contributor

    Can you guys who are still having the error confirm that you are using database users and logging in with email address ? This would align with #28234 (comment)

  18. PVince81 commented on Jun 27, 2018

    @PVince81
    Contributor

    @djgrubson the bug above is only about bad login entries in the log, not about being unable to log in at all. Please raise a separate ticket with your environment details as it's likely a different issue.

    Same applies for anyone here who cannot login at all, not just having the log filled with entries but being able to login.

    This will help better analyze the issue without getting into misunderstandings due to talking about different issues. Thanks

  19. PVince81 commented on Jun 27, 2018

    @PVince81
    Contributor

    also important to mention in your env, whether you are using fail2ban based on scanning for such entries, in which case bogus entries could prevent a login if they happen too often

  20. djgrubson commented on Jun 27, 2018

    @djgrubson

    @PVince81 I have stopped fail2ban and now can login in into UI, thanks for pointing this out.
    Thanks for help all.

  21. djgrubson commented on Jun 27, 2018

    @djgrubson

    I also had auth_basic enabled in nginx which I heard doesn’t really work well with owncloud?

  22. stale commented on Sep 20, 2021

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions